summaryrefslogtreecommitdiffstats
path: root/apps/user_ldap/lib
Commit message (Collapse)AuthorAgeFilesLines
* Clean up LDAP Wizard typingCôme Chilliet2022-10-202-104/+99
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Merge pull request #30223 from nextcloud/nested_ldap_groupsCôme Chilliet2022-10-203-194/+160
|\ | | | | Nested ldap groups
| * Fix psalmCarl Schwan2022-10-201-1/+4
| | | | | | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
| * Check if cache is present with issetCarl Schwan2022-10-201-1/+1
| | | | | | | | | | | | Otherwise we get false for empty array Signed-off-by: Carl Schwan <carl@carlschwan.eu>
| * Bring back small fixes by CarlCôme Chilliet2022-10-201-8/+6
| | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
| * Fix LDAP recursive nested group supportCôme Chilliet2022-10-201-4/+7
| | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
| * Revert Carl changes on apps/user_ldap/lib/Group_LDAP.phpCarl Schwan2022-10-201-27/+12
| | | | | | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
| * Fix user_ldap testsCarl Schwan2022-10-202-14/+14
| | | | | | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
| * Add back runtime cache for intermediate ldap read resultsCarl Schwan2022-10-201-2/+10
| | | | | | | | | | | | This is a small optimization that save a few LDAP queries Signed-off-by: Carl Schwan <carl@carlschwan.eu>
| * Only cache base inGroup searchCarl Schwan2022-10-201-8/+15
| | | | | | | | | | | | | | And not intermediate search for nested groups, this is causing issues othewise with nested groups Signed-off-by: Carl Schwan <carl@carlschwan.eu>
| * Add missing copyright author in Group_LDAPCôme Chilliet2022-10-201-0/+1
| | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
| * Removed unused use declarationCôme Chilliet2022-10-201-1/+0
| | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
| * Fix types in docblocksCôme Chilliet2022-10-201-0/+1
| | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
| * Refactor group membership listing for nested groupsCôme Chilliet2022-10-201-147/+67
| | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
| * Small optimisation of _groupMembersCôme Chilliet2022-10-201-2/+7
| | | | | | | | | | | | | | This will not change the result as users are check to be existing afterwards but avoids this check when we know it’s a group. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
| * Refactor _groupMembers to correctly use cache on intermediate resultsCôme Chilliet2022-10-201-35/+28
| | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
| * Fix merging list with nullCarl Schwan2022-10-201-1/+2
| | | | | | | | | | | | | | | | This fixes some cases observed with the debugger where we end up merging a non empty list with null. The result is then null and the looping over the items would then end. Signed-off-by: Carl Schwan <carl@carlschwan.eu>
| * Unify a bit the types of the fetcherCarl Schwan2022-10-201-16/+17
| | | | | | | | | | | | | | Now it will only accept a string as parameter instead of either a string (DN) or a array (complete record). Signed-off-by: Carl Schwan <carl@carlschwan.eu>
| * Add more type hintingCarl Schwan2022-10-201-31/+43
| | | | | | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
| * Cache intermediatesArthur Schiwon2022-10-202-1/+13
| | | | | | | | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de> Co-authored-by: Carl Schwan <carl@carlschwan.eu>
| * Refactor code to split common loopArthur Schiwon2022-10-201-37/+15
| | | | | | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
| * Make it possible to return nested records whem walking over groupsArthur Schiwon2022-10-201-4/+43
| | | | | | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* | Cleanup typing and improve loggingCôme Chilliet2022-10-203-44/+55
| | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | Fix ldap_parse_result callCôme Chilliet2022-10-201-4/+13
| | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | Adapt interface to new search signatureCôme Chilliet2022-10-201-1/+1
| | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | Pass paging information directly to search and get rid of adapterCôme Chilliet2022-10-205-188/+19
| | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | Renamed ambiguous $limit parameter to pageSizeCôme Chilliet2022-10-201-9/+9
| | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | Unfold call to ldap_parse_result. Handle cookie outside of adapter.Côme Chilliet2022-10-204-115/+36
| | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | Do not init a paged search for read operationsCôme Chilliet2022-10-201-19/+2
| | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | Remove useless getReadArgs/setReadArgs methods from PagedResultsCôme Chilliet2022-10-203-31/+1
| | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | Remove dead code in paged result handlingCôme Chilliet2022-10-205-64/+7
|/ | | | | | | There is only one paged result API now that PHP 7.2 is long dead. Starting by removing empty function calls. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Avoid double ldap_unbind in Wizard.phpCôme Chilliet2022-10-111-1/+0
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Fix code style with codesnifferCôme Chilliet2022-10-111-18/+18
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Fix typos in apps/ subdirectoryluz paz2022-09-055-10/+10
| | | | | | | Found via `codespell -q 3 -S l10n,./apps/files_external/3rdparty -L adn,ba,boxs,keypair,jus,optionel,ressource,tabel ./apps/` Signed-off-by: luz paz <luzpaz@github.com> Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
* Merge pull request #33047 from nextcloud/fix/ijob-logger-deprecatedCarl Schwan2022-08-231-4/+4
|\ | | | | Deprecated ILogger from IJob
| * Port existing server code to new interfaceCarl Schwan2022-08-081-4/+4
| | | | | | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* | Remove unused methodJoas Schilling2022-08-221-14/+0
| | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* | Fix plural usage in LDAP wizardJoas Schilling2022-08-221-13/+20
|/ | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Move CappedMemoryCache to OCPCarl Schwan2022-07-143-3/+3
| | | | | | | | This is an helpful helper that should be used in more place than just server and this is already the case with groupfodlers, deck, user_oidc and more using it, so let's make it public Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* simplify blizzz2022-06-281-1/+1
| | | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de> Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
* delete groups in chunks instead of one by oneArthur Schiwon2022-06-281-5/+11
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* cleanup LDAP's UpdateGroupsArthur Schiwon2022-06-281-41/+43
| | | | | | | | | | | | | | - TimedJob from API - DI of config - property types - throws hints in phpdoc - argument and return types - replace depracet execute() with executeStatement or -Query - a missing return statement Co-authored-by: Carl Schwan <carl@carlschwan.eu> Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Fix profiler trying to serialize invalid utf8Carl Schwan2022-06-201-1/+9
| | | | | | | The cookie value contains invalid utf8 characters most of the time so let's just ignore it as it is also not that interesting to analyse. Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Add stricter psalm type for CappedMemoryCacheCarl Schwan2022-05-123-52/+24
| | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* 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 createNamedParameter in LDAP migrationsJohn Molakvoæ2022-04-072-2/+2
| | | | Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
* Merge pull request #31661 from ↵blizzz2022-04-055-21/+162
|\ | | | | | | | | nextcloud/enh/user_ldap-add-command-to-unmap-groups Add ldap:reset-group command to unmap groups from LDAP
| * Fix user_ldap unit testsCôme Chilliet2022-04-011-4/+3
| | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
| * Add missing fileCôme Chilliet2022-04-011-0/+111
| | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
| * Add type information to fix psalm errorCôme Chilliet2022-04-011-0/+1
| | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>