aboutsummaryrefslogtreecommitdiffstats
path: root/apps/user_ldap/tests/Group_LDAPTest.php
Commit message (Collapse)AuthorAgeFilesLines
* chore: run rectorrector-phpunit10Robin Appelman2025-07-011-20/+7
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* test: Migrate User LDAP to phpunit 10tests/noid/ldapJoas Schilling2025-05-281-47/+38
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* chore: Apply new rector configuration to apps folderCôme Chilliet2025-02-131-1/+3
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* chore(deps): Update nextcloud/coding-standard to v1.3.1provokateurin2024-09-191-2/+2
| | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* refactor: Add void return type to PHPUnit test methodsChristoph Wurst2024-09-151-41/+41
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* chore: Add SPDX headerAndy Scherzinger2024-05-301-27/+4
| | | | Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
* fix: Apply new coding standard to all filesCôme Chilliet2024-04-021-1/+1
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* fix(LDAP): ensure stored groups are formatted as simple listArthur Schiwon2023-12-201-0/+27
| | | | | | | | | With array_unique it is possible that the keys are not in sequential order but have gaps. json_encode then would store them as associative array, which later on json_decode would result in a stdClass by default. This is unexpected and would also contradict the return type hint. Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* chore: apply changes from Nextcloud coding standards 1.1.1Joas Schilling2023-11-231-1/+1
| | | | | Signed-off-by: Joas Schilling <coding@schilljs.com> Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
* fix(LDAP): solve race condition reading groups of disappeared LDAP userArthur Schiwon2023-10-111-2/+85
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* refactor(LDAP): pass IConfig via constructor to Group_LDAPArthur Schiwon2023-10-101-13/+10
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* refactor(tests): simplify code, reduce duplicationArthur Schiwon2023-10-091-425/+257
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* test(Group LDAP): add test for getting groups of OfflineUserArthur Schiwon2023-10-091-0/+45
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Refactors "strpos" calls in /apps/user_ldap to improve code readability.Faraz Samapoor2023-06-021-3/+3
| | | | Signed-off-by: Faraz Samapoor <f.samapoor@gmail.com>
* Fix LDAP recursive nested group supportCôme Chilliet2022-10-201-15/+14
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Fix user_ldap testsCarl Schwan2022-10-201-8/+3
| | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Add testing of nested group membershipCôme Chilliet2022-10-201-11/+31
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Refactor group membership listing for nested groupsCôme Chilliet2022-10-201-1/+3
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Add tests for nested groupsCôme Chilliet2022-10-201-8/+45
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Fix typos in apps/ subdirectoryluz paz2022-09-051-4/+4
| | | | | | | 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>
* Fix user_ldap unit testsCôme Chilliet2022-04-011-2/+2
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Fix unit testsCôme Chilliet2022-03-031-14/+20
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* fix caching of objectsid searchesArthur Schiwon2021-09-211-0/+32
| | | | | | | - store result when no name could be retrieved, too - cached value is not an array, was treated wrongly Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Update php licensesJohn Molakvoæ (skjnldsv)2021-06-041-1/+0
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Update all license headers for Nextcloud 21Christoph Wurst2020-12-161-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* php-cs happynessArthur Schiwon2020-11-271-47/+47
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* add unit testsArthur Schiwon2020-11-271-0/+173
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* when nesting is not enabled, the group filter can be applied right awayArthur Schiwon2020-10-191-6/+36
| | | | | | | | - helps performance, but skipping unnecessary entries - reduces reoccuring info-level log output against groups that do not qualify ("no or empty name") Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* do not flip available state to unavailable, allow empty resultsArthur Schiwon2020-08-111-2/+20
| | | | | | | | | - the detection relies that the first, requested result is not empty - it might be empty though – groups without members - protect switching from available to unavailable - switching the other way around was also not envisaged either Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* LDAP: shortcut in reading nested group members when IN_CHAIN is availableArthur Schiwon2020-08-111-0/+2
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Merge pull request #21171 from nextcloud/enh/noid/tidy-up-group-ldapMorris Jobke2020-07-061-36/+37
|\ | | | | tidy up Group_LDAP
| * tidy up Group_LDAPArthur Schiwon2020-06-081-36/+37
| | | | | | | | | | | | | | | | | | | | * remove unused method * resolve code duplication * remove usage of deprectad Util::writeLog * phpDoc updates * signature updates Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* | fix strings being passed where arrays where expectedArthur Schiwon2020-06-241-0/+6
|/ | | | | | also brought type hints up to internal API level Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Update license headers for 19Christoph Wurst2020-04-291-2/+0
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* formattingArthur Schiwon2020-04-231-18/+18
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* read records from DB for lists at once, not one by one.Arthur Schiwon2020-04-171-24/+48
| | | | | | Keep a runtime cache of dn-id-mapping Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Format control structures, classes, methods and functionChristoph Wurst2020-04-101-18/+17
| | | | | | | | | | | | | | | To continue this formatting madness, here's a tiny patch that adds unified formatting for control structures like if and loops as well as classes, their methods and anonymous functions. This basically forces the constructs to start on the same line. This is not exactly what PSR2 wants, but I think we can have a few exceptions with "our" style. The starting of braces on the same line is pracrically standard for our code. This also removes and empty lines from method/function bodies at the beginning and end. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use elseif instead of else ifChristoph Wurst2020-04-101-4/+4
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Remove trailing and in between spacesChristoph Wurst2020-04-091-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Unify function spacing to PSR2 recommendationChristoph Wurst2020-04-091-12/+12
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update the license headers for Nextcloud 19Christoph Wurst2020-03-311-0/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use the short array syntax, everywhereChristoph Wurst2020-03-261-12/+12
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use the shorter phpunit syntax for mocked return valuesChristoph Wurst2020-03-251-58/+58
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* adjust testsArthur Schiwon2020-01-081-1/+1
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Update license headersChristoph Wurst2019-12-051-2/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Mode to modern phpunitRoeland Jago Douma2019-11-271-15/+15
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Some php-cs fixesRoeland Jago Douma2019-11-221-2/+2
| | | | | | | | | | | * Order the imports * No leading slash on imports * Empty line before namespace * One line per import * Empty after imports * Emmpty line at bottom of file Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* group display name support (service level + ldap)Arthur Schiwon2019-05-271-0/+39
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* remove unused use statementArthur Schiwon2019-03-061-1/+0
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* fix nested group retrieval also for 2 other casesArthur Schiwon2019-03-051-24/+32
| | | | | | and also consolidate logic in one method Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>