aboutsummaryrefslogtreecommitdiffstats
path: root/apps/user_ldap/lib/Connection.php
Commit message (Collapse)AuthorAgeFilesLines
* fix(l10n): put placeholder like string into variablefix/l10n-placeholderFerdinand Thiessen2025-04-071-2/+2
| | | | | | Otherwise this is wrongly handled by our translation community. Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* fix(LDAP): use ldap_set_option over putenv to disable cert checkfix/noid/ldap-setopt-for-disabling-certcheckArthur Schiwon2025-03-031-13/+14
| | | | | | the putenv option was not working reliable anymore anyway Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* fix(user_ldap): Check that all user and group bases are in the global oneCôme Chilliet2025-02-251-9/+35
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* fix(user_ldap): Add missing use in ajax endpoint and fix L10N injectionCôme Chilliet2025-02-251-1/+2
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* feat(user_ldap): Improve error detail when saving an incorrect configurationCôme Chilliet2025-02-251-31/+49
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* chore: Apply new rector configuration to apps folderCôme Chilliet2025-02-131-3/+7
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* fix(LDAP): also log why the connection to main server failedfix/noid/ldap-no-connection-reasonArthur Schiwon2025-01-241-2/+4
| | | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* refactor(apps): Use constructor property promotion when possibleprovokateurin2024-10-211-7/+8
| | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* chore(deps): Update nextcloud/coding-standard to v1.3.1provokateurin2024-09-191-7/+7
| | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* feat: add profile pronounsJohn Molakvoæ (skjnldsv)2024-09-171-0/+1
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* chore: adjust code to adhere to coding standardAnna Larch2024-09-051-2/+1
| | | | Signed-off-by: Anna Larch <anna@nextcloud.com>
* style: update codestyle for coding-standard 1.2.3Daniel Kesselberg2024-08-251-2/+2
| | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* chore: Add SPDX headerAndy Scherzinger2024-05-301-34/+4
| | | | Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
* feat(ldap): sync additional properties to profile and SABJake Nabasny2024-05-301-0/+1
| | | | | | | | | | | | | | | Synced from LDAP to profile: - Date of birth Synced from LDAP to SAB (via the profile): - Biography - Date of birth Original code by Jake Nabasny (GitHub: @slapcat) Co-authored-by: Jake Nabasny <jake@nabasny.com> Co-authored-by: Richard Steinmetz <richard@steinmetz.cloud> Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
* fix(user_ldap): Improve typing and fix a var nameCôme Chilliet2024-04-301-2/+2
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* fix: Fix newly spotted psalm issues, add exhaustive typed magic properties ↵Côme Chilliet2024-04-301-41/+71
| | | | | | for LDAP classes Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* fix: Fix typing issues related to resource migrationCôme Chilliet2024-04-091-3/+0
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* fix: Fix small psalm errors in FTP and LDAP connectionsCôme Chilliet2024-04-091-2/+1
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* fix(user_ldap): Fix tests using wrong typesCôme Chilliet2024-04-091-1/+5
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* fix: Remove obsolete resource typingCôme Chilliet2024-04-091-36/+15
| | | | | | In PHP>=8.1, LDAP and FTP resources are always typed objects Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* fix: Apply new coding standard to all filesCôme Chilliet2024-04-021-1/+1
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* enh(LDAP): implement IIsAdmin interfaceArthur Schiwon2023-12-011-0/+1
| | | | | | | | - add configuration to specify one LDAP group acting as admin group (CLI) - implement `isAdmin()` method, basically relying on inGroup against the configured group Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* fix(ldap): store last known user groupsArthur Schiwon2023-10-091-0/+4
| | | | | | - for LDAP user life cycle management Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Merge pull request #34443 from nextcloud/feat/add-enabled-user-backendCôme Chilliet2023-07-031-0/+1
|\ | | | | Add IProvideEnabledStateBackend interface
| * [user_ldap] Add per-connection setting for marking remnants as disabledCôme Chilliet2023-05-231-0/+1
| | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | Refactors "strpos" calls in /apps/user_ldap to improve code readability.Faraz Samapoor2023-06-021-1/+1
|/ | | | Signed-off-by: Faraz Samapoor <f.samapoor@gmail.com>
* nice up the code handling AccountManagerMarc Hefter2023-04-061-1/+0
| | | | | | | | | | | merging defaultScopes from DEFAULT_SCOPES and account_manager.default_property_scope removing unneccessary profileScope setting (using config.php instead) honoring admin choice 'profile.enabled'=>false in config.php moved checking for empty array to updateProfile function corrected some typos and cleaned some comments Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com> Signed-off-by: Marc Hefter <marchefter@gmail.com>
* refined code, to be independend from OCP\IUserMarc Hefter2023-04-061-1/+1
| | | | | | | | | rework updateProfile in user_ldap/lib/User/User.php some cleanup at processAttributes in user_ldap/lib/User/User.php rearranged Fediverse attribute, to match profile layout Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com> Signed-off-by: Marc Hefter <marchefter@gmail.com>
* handling updateProfile with array of valuesMarc Hefter2023-04-061-0/+1
| | | | | | | | | using an array to buffer profile updates, like suggested by @come-nc clean some code and remove unneccessary redundancy added the Fediverse profile property Co-Authored-By: Côme Chilliet <91878298+come-nc@users.noreply.github.com> Signed-off-by: Marc Hefter <marchefter@gmail.com>
* added user profile scope settingMarc Hefter2023-04-061-0/+1
| | | | | Signed-off-by: Marc Hefter <marchefter@march42.net> Signed-off-by: Marc Hefter <marchefter@gmail.com>
* feature addition: [user_ldap] update user profile from LDAP; WIP; fixing ↵Marc Hefter2023-04-061-0/+1
| | | | | | | some uggly copy-and-paste errors; testing functionality; preparing and editing the documentation Signed-off-by: Marc Hefter <marchefter@march42.net> Signed-off-by: Marc Hefter <marchefter@gmail.com>
* feature addition: [user_ldap] update user profile from LDAP; WIP ↵Marc Hefter2023-04-061-0/+7
| | | | | | work-in-progress; TODO update profile Signed-off-by: Marc Hefter <marchefter@march42.net>
* Apply a longer TTL of 15min to falling back on backup serverCôme Chilliet2022-12-201-4/+5
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Fixed backup host logicCôme Chilliet2022-12-191-26/+24
| | | | | | | Now forcing backup host applies to both main and background. And background will fallback to backup if not responding. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Make code clearer for background hostCôme Chilliet2022-12-191-8/+8
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Use a dedicated LDAP host and port for background jobs if configuredCôme Chilliet2022-12-191-3/+9
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Merge pull request #24574 from zenlord/ldapi-unix-socket-supportCôme Chilliet2022-12-081-1/+8
|\ | | | | Ldapi unix socket support
| * Add ldap-unix-socket support - squashed commits to files Connection.php, ↵Vincent Van Houtte2022-09-091-1/+8
| | | | | | | | | | | | Configuration.php, Wizard.php, LDAP.php and view.js Signed-off-by: Vincent Van Houtte <vvh@aplusv.be>
* | Merge pull request #35355 from nextcloud/artonge/feat/ldap_connection_timeoutblizzz2022-11-301-0/+4
|\ \ | | | | | | Allow to set a custom timeout for ldap connections
| * | Allow to set a custom timeout for ldap connectionsLouis Chemineau2022-11-231-0/+4
| |/ | | | | | | Signed-off-by: Louis Chemineau <louis@chmn.me>
* | Improve a bit codestyleCôme Chilliet2022-11-221-3/+2
| | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | Log as warning instead of info when main LDAP server is unreachableCôme Chilliet2022-11-211-1/+1
| | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | Log switching to LDAP backup host because main one is not availableCôme Chilliet2022-11-171-5/+11
|/ | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Don't use slow hashing to check the LDAP bindingCarl Schwan2022-05-051-8/+3
| | | | | | | | | Using password_hash is expensive and should be used for hashing passwords when saving them in the database. Here we just want to see if the bind was already done with the given password, so use a fast hashing algorythm. Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Fix unit testsCôme Chilliet2022-03-031-7/+31
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Fix types in OCA\User_LDAP\ConfigurationCôme Chilliet2022-03-031-2/+2
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Improve typing in OCA\User_LDAP\Access and reduce psalm errorsCôme Chilliet2022-02-081-1/+1
| | | | | | | This should avoid some PHP warning using PHP 8.1 and help detecting type trouble early in the future. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Fix PHP 8.1 support for user_ldap applicationCôme Chilliet2021-12-161-3/+6
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Use Psr\Log\LoggerInterface where it can easily be used in user_ldapCôme Chilliet2021-10-141-34/+36
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Add return type for writeToCacheDaniel Kesselberg2021-06-151-4/+2
| | | | | | writeToCache does not return a string. Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>