summaryrefslogtreecommitdiffstats
path: root/apps/user_ldap/tests
Commit message (Collapse)AuthorAgeFilesLines
* fix(LDAP): ensure stored groups are formatted as simple listArthur Schiwon2023-12-221-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>
* fix(LDAP): solve race condition reading groups of disappeared LDAP userArthur Schiwon2023-10-301-2/+85
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* refactor(LDAP): pass IConfig via constructor to Group_LDAPArthur Schiwon2023-10-302-14/+13
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* refactor(tests): simplify code, reduce duplicationArthur Schiwon2023-10-301-425/+257
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* test(Group LDAP): add test for getting groups of OfflineUserArthur Schiwon2023-10-301-0/+45
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Merge pull request #37201 from AaronDewes/fix/ldap-filter-generationCôme Chilliet2023-10-021-2/+2
| | | Fix: Escape group names for LDAP
* fix(ldap): avatar is not being fetchedArthur Schiwon2023-09-111-2/+10
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Adapt Sync job tests to the constructor changeCôme Chilliet2023-04-271-2/+1
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Merge pull request #34772 from nextcloud/fix/clean-ldap-access-factory-usageCôme Chilliet2022-12-201-7/+13
|\ | | | | Make sure to use AccessFactory to create Access instances and use DI
| * Adapt test to User_Proxy constructorCôme Chilliet2022-10-251-7/+13
| | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | Fixed backup host logicCôme Chilliet2022-12-191-1/+1
| | | | | | | | | | | | | | 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>
* | Merge pull request #35231 from ↵Côme Chilliet2022-12-191-1/+1
|\ \ | | | | | | | | | | | | nextcloud/fix/user_ldap-cache-fetched-list-of-groups Cache the fetched list of groups
| * | Fix user_ldap tests now that list of groups gets cachedCôme Chilliet2022-12-191-1/+1
| |/ | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* / Fix job tests in updatenotification and user_ldap applicationsCôme Chilliet2022-12-051-1/+3
|/ | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Merge pull request #33945 from nextcloud/fix/noid/fair-use-ldapSimon L2022-10-211-1/+2
|\ | | | | LDAP to not register new users when outside of fair use or over limits
| * LDAP to no register new users when outside of fair use or over limitsArthur Schiwon2022-10-181-1/+2
| | | | | | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* | 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-053-6/+6
| | | | | | | 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>
* Port existing server code to new interfaceCarl Schwan2022-08-081-1/+2
| | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* adjust testsArthur Schiwon2022-06-281-20/+31
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Remove bogus expects from user_ldap testsCôme Chilliet2022-06-141-3/+0
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Remove deprecated at() matcher from user_ldap testsCôme Chilliet2022-06-133-34/+27
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Fix user_ldap unit testsCôme Chilliet2022-04-012-10/+10
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Fix unit testsCôme Chilliet2022-03-035-25/+41
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* add occ command to update UUIDs (incomplete)Arthur Schiwon2022-02-101-1/+1
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Fix PHP 8.1 support for user_ldap applicationCôme Chilliet2021-12-162-3/+3
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Merge pull request #29470 from nextcloud/fix/translit-php8blizzz2021-11-291-7/+2
|\ | | | | Avoid use of iconv to get rid of unicode
| * Fix sanitizing regex and add a test case for uppercase in usernameCôme Chilliet2021-11-231-0/+1
| | | | | | | | | | | | | | I did not find any test data that would fail with the previous regex, but still added data with uppercase to at least test that. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
| * Avoid use of iconv to get rid of unicodeCôme Chilliet2021-10-281-7/+1
| | | | | | | | | | | | | | | | Using iconv for translit depends upon server configuration, locale, and PHP version. Using htmlentities instead to have a consistent behavior independent of configuration. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | Merge pull request #29610 from nextcloud/fix/user_ldap-loggerCôme Chilliet2021-11-235-17/+16
|\ \ | | | | | | Get rid of user_ldap LogWrapper and use LoggerInterface
| * | Get rid of LogWrapper calling deprecated logger and use LoggerInterface from ↵Côme Chilliet2021-11-095-17/+16
| |/ | | | | | | | | | | PSR instead Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* / Test cache invalidation for AbstractMapping in test suiteCôme Chilliet2021-11-221-0/+4
|/ | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Use Psr\Log\LoggerInterface in OCA\User_LDAP\AccessCôme Chilliet2021-10-122-5/+10
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Merge pull request #28876 from nextcloud/fix/28653/ldap-long-user-group-idsblizzz2021-09-241-1/+30
|\ | | | | ensure that user and group IDs in LDAP's tables are also max 64chars
| * ensure that user and group IDs in LDAP's tables are also max 64charsArthur Schiwon2021-09-241-1/+30
| | | | | | | | | | | | | | | | - limitation by core tables (e.g. sharing), IDs are always 64chars - when longer group IDs were requested they are hashed (does not affect displaynames) Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* | 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>
* Migrate HintException to OCPGary Kim2021-06-302-4/+4
| | | | Signed-off-by: Gary Kim <gary@garykim.dev>
* Add method to read multi-value attributes from ldap.Daniel Kesselberg2021-06-161-0/+191
| | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* Update php licensesJohn Molakvoæ (skjnldsv)2021-06-0440-66/+23
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* l10n: Spelling unificationValdnet2021-05-211-3/+3
| | | | | Spelling unification in Transifex. Signed-off-by: Valdnet 47037905+Valdnet@users.noreply.github.com
* Fix LDAP unit testsJoas Schilling2021-04-201-2/+2
| | | | | | | 20) OCA\user_ldap\tests\Jobs\UpdateGroupsTest::testHandleKnownGroups Trying to configure method "fetchAll" which cannot be configured because it does not exist, has not been specified, is final, or is static Signed-off-by: Joas Schilling <coding@schilljs.com>
* Bump nextcloud/coding-standard from 0.3.0 to 0.5.0dependabot-preview[bot]2021-02-183-21/+21
| | | | | | | | | | Bumps [nextcloud/coding-standard](https://github.com/nextcloud/coding-standard) from 0.3.0 to 0.5.0. - [Release notes](https://github.com/nextcloud/coding-standard/releases) - [Changelog](https://github.com/nextcloud/coding-standard/blob/master/CHANGELOG.md) - [Commits](https://github.com/nextcloud/coding-standard/compare/v0.3.0...v0.5.0) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Cache the user backend info for 300sJoas Schilling2021-02-151-1/+3
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Merge pull request #25101 from nextcloud/fix/noid/ldap-known-groupsChristoph Wurst2021-01-291-0/+44
|\ | | | | LDAP: make actually use of batch read known groups
| * really use known groupsArthur Schiwon2021-01-121-0/+44
| | | | | | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* | respect DB limits limit per statement and queryArthur Schiwon2021-01-111-0/+19
|/ | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>