summaryrefslogtreecommitdiffstats
path: root/apps/user_ldap/tests
Commit message (Collapse)AuthorAgeFilesLines
* Cancel 1 LDAP test for php8Roeland Jago Douma2020-12-071-0/+3
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Test requires the DBJoas Schilling2020-11-091-0/+3
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Use query builder instead of OC_DB in user_ldapJoas Schilling2020-11-064-5/+5
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* adds unit test for updategroups background jobArthur Schiwon2020-10-301-0/+189
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* user share manager to determine share ownershipArthur Schiwon2020-10-268-42/+46
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* fixes determining whether former user is a share ownerArthur Schiwon2020-10-261-3/+5
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* add test for active shares flagArthur Schiwon2020-10-261-0/+93
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* LDAP simplify User_Proxy and Group_Proxy signaturesArthur Schiwon2020-10-235-69/+49
| | | | | | | | | - make User_Proxy and Group_Proxy easy to instantiate - simplify dependent code - move commands to info.xml - make UpdateGroups job class non-static 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>
* Format code to a single space around binary operatorsChristoph Wurst2020-10-0513-32/+32
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update license headers for Nextcloud 20 (again)Christoph Wurst2020-09-071-1/+0
| | | | | | | There are still lots of outdated headers, so time for another round of updates. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* these code bits were part of old logic that was already refactored outArthur Schiwon2020-09-041-79/+0
| | | | | | - only references were in unit tests Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Update the license headers for Nextcloud 20Christoph Wurst2020-08-2414-6/+13
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Merge pull request #22199 from ↵Morris Jobke2020-08-1214-80/+80
|\ | | | | | | | | nextcloud/techdebt/noid/PHPUnit_Framework_MockObject_MockObject Change PHPDoc type hint from PHPUnit_Framework_MockObject_MockObject to …
| * Change PHPDoc type hint from PHPUnit_Framework_MockObject_MockObject to ↵Morris Jobke2020-08-1214-80/+80
| | | | | | | | | | | | \PHPUnit\Framework\MockObject\MockObject Signed-off-by: Morris Jobke <hey@morrisjobke.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>
* Do not use custom DI object names for user_ldapMorris Jobke2020-07-137-11/+20
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.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-243-0/+38
|/ | | | | | also brought type hints up to internal API level Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* compress some images with tinypng.comRuben Barkow-Kuder2020-05-221-0/+0
| | | | | Signed-off-by: Ruben Barkow-Kuder <github@r.z11.de> Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
* Update license headers for 19Christoph Wurst2020-04-2915-2/+14
| | | | 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>
* PHP-CS-Fixer greenRoeland Jago Douma2020-04-161-3/+3
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* use serverControls directly with LDAP calls, fixes 19127Arthur Schiwon2020-04-143-22/+23
| | | | | | | | - adapters for PHP API version to Support PHP < 7.3 - switch to pass only one base per search - cookie logic is moved from Access to API adapters Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Format control structures, classes, methods and functionChristoph Wurst2020-04-1030-236/+214
| | | | | | | | | | | | | | | 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-103-12/+12
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Remove trailing whitespaces from commentsChristoph Wurst2020-04-091-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Remove trailing and in between spacesChristoph Wurst2020-04-094-8/+8
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Unify function spacing to PSR2 recommendationChristoph Wurst2020-04-099-81/+81
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use exactly one empty line after the namespace declarationChristoph Wurst2020-04-097-6/+1
| | | | | | For PSR2 Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Fix (array) indent style to always use one tabChristoph Wurst2020-04-094-32/+32
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update the license headers for Nextcloud 19Christoph Wurst2020-03-3113-0/+13
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Merge pull request #20170 from nextcloud/techdebt/remove-unused-importsChristoph Wurst2020-03-274-4/+0
|\ | | | | Remove unused imports
| * Remove unused importsChristoph Wurst2020-03-254-4/+0
| | | | | | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* | Use the short array syntax, everywhereChristoph Wurst2020-03-2612-119/+119
| | | | | | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* | Use the shorter phpunit syntax for mocked return valuesChristoph Wurst2020-03-259-326/+326
|/ | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* remove superfluous testsArthur Schiwon2020-01-081-58/+0
| | | | | | | | - user_ldap is not exposed to public api, it is always behind ldap_proxy - this is too much for a unit test - integration tests cover userExists implicitly Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* adjust testsArthur Schiwon2020-01-082-36/+11
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* relax strict getHome behaviour for LDAP users in a shadow stateArthur Schiwon2020-01-081-16/+5
| | | | | | | | * simplifies deletion process * less strange behaviour when looking up home storage (as long as it is local) * thus could enable transfer ownerships after user went invisible on ldap Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Update license headersChristoph Wurst2019-12-0542-44/+67
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Add typed create user eventsChristoph Wurst2019-12-031-67/+72
| | | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at> Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* TO REVERT LATER: disable some tests in UserTestRoeland Jago Douma2019-11-271-5/+5
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Mode to modern phpunitRoeland Jago Douma2019-11-2721-160/+160
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Fix more testsRoeland Jago Douma2019-11-271-1/+2
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Make phpunit8 compatibleRoeland Jago Douma2019-11-2720-22/+22
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Some php-cs fixesRoeland Jago Douma2019-11-2216-24/+23
| | | | | | | | | | | * 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>
* Don't process known avatars from LDAPArthur Schiwon2019-09-041-0/+93
| | | | | | | | | * avoids useless FS operation * avoids useless DB writes * avoids useless addressbook updates * addendum to #17001 Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>