aboutsummaryrefslogtreecommitdiffstats
path: root/apps/user_ldap/lib/Command
Commit message (Collapse)AuthorAgeFilesLines
* chore: Add SPDX headerAndy Scherzinger2024-05-3013-280/+42
| | | | Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
* fix(LDAP): escape DN on check-userArthur Schiwon2024-04-051-1/+2
| | | | | | | the DN has to be escaped differently when used as a base and we were missing it here in the search method call in the check-user command. Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Update apps/user_ldap/lib/Command/Search.phpFaraz Samapoor2024-02-061-1/+1
| | | | Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com> Signed-off-by: Faraz Samapoor <f.samapoor@gmail.com>
* Refactors user_ldap app commands.Faraz Samapoor2024-02-0612-223/+143
| | | | | | | To improve code readability. Signed-off-by: Faraz Samapoor <f.samapoor@gmail.com> Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
* feat(LDAP): warn about demoting a group while promoting anotherArthur Schiwon2023-12-011-8/+23
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* enh(LDAP): add occ command to promote an LDAP group to adminArthur Schiwon2023-12-011-0/+113
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* chore: apply changes from Nextcloud coding standards 1.1.1Joas Schilling2023-11-236-75/+74
| | | | | Signed-off-by: Joas Schilling <coding@schilljs.com> Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
* Fix check-group --update for deleted groupsCôme Chilliet2023-08-101-2/+10
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Fix check-group command for new groupsCôme Chilliet2023-08-101-6/+12
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Add output to check-group --update commandCôme Chilliet2023-08-101-1/+25
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Always empty cache before updating a groupCôme Chilliet2023-08-101-0/+1
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Add check-group commandCôme Chilliet2023-08-101-0/+142
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Make sure to use AccessFactory to create Access instances and use DICôme Chilliet2022-10-251-12/+18
| | | | 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>
* Avoid updating _lastChange when nothing is changed in the configurationCôme Chilliet2022-03-311-0/+1
| | | | | | | Had to set at least one var when creating an empty configuration in order to save the default values. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Make it explicit that a DN can be used for ldap:check-userCôme Chilliet2022-02-171-2/+8
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Improve typing in apps/user_ldap/lib/Command/CheckUser.phpCôme Chilliet2022-02-171-12/+4
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Remove parenthesis around return in apps/user_ldap/lib/Command/CheckUser.phpCôme Chilliet2022-02-171-1/+1
| | | | | | Co-authored-by: Carl Schwan <carl@carlschwan.eu> Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Fix ldap:check-user method for newly created LDAP usersCôme Chilliet2022-02-171-15/+11
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Fix ldap:update-uuidCôme Chilliet2022-02-101-18/+27
| | | | | | | | Generators cannot be iterated with while or returned by an other generator, using foreach instead. And a few other problems. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* add occ command to update UUIDs (incomplete)Arthur Schiwon2022-02-101-0/+365
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* fix overwriting of SUCCESS and INVALID constsArthur Schiwon2022-02-031-6/+6
| | | | | | - already defined in Symfony\Component\Console\Command\Command Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Improve ldap:test-config occ commandCôme Chilliet2022-01-041-21/+46
| | | | | | | | Test a search on the base, as the settings wizard is doing. This is to avoid the wizard saying the base is wrong and the command saying everything is fine. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Ignore cache in occ ldap:check-ldap commandCôme Chilliet2021-11-221-1/+1
| | | | | | | | | This avoids having to wait or reset the cache after deleting a user in the LDAP. This also fixes a PHP error when running ldap:check-ldap --update on a deleted but cached user. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Convert command option defaults to stringsChristoph Wurst2021-06-091-2/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update php licensesJohn Molakvoæ (skjnldsv)2021-06-049-17/+3
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Add json, yaml output options to ldap:show-configJohannes Leuker2021-03-311-15/+41
| | | | Signed-off-by: Johannes Leuker <j.leuker@hosting.de>
* adds ldap user:reset commandArthur Schiwon2021-03-171-0/+112
| | | | | | | | - allows to delete data of existing LDAP users, which otherwise is safe guarded - ensures that the user is not being deleted on LDAP through a plugin Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Update all license headers for Nextcloud 21Christoph Wurst2020-12-161-1/+0
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use query builder instead of OC_DB in user_ldapJoas Schilling2020-11-063-3/+3
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* LDAP simplify User_Proxy and Group_Proxy signaturesArthur Schiwon2020-10-231-16/+10
| | | | | | | | | - 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>
* Format code to a single space around binary operatorsChristoph Wurst2020-10-051-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update the license headers for Nextcloud 20Christoph Wurst2020-08-242-0/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Remove unexpected argumentDaniel Kesselberg2020-08-102-2/+2
| | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* Do not use custom DI object names for user_ldapMorris Jobke2020-07-131-2/+4
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Also always return in app commandsJoas Schilling2020-06-268-12/+23
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Update license headers for 19Christoph Wurst2020-04-295-0/+5
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* use serverControls directly with LDAP calls, fixes 19127Arthur Schiwon2020-04-141-1/+1
| | | | | | | | - 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-107-27/+24
| | | | | | | | | | | | | | | 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-2/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use exactly one empty line after the namespace declarationChristoph Wurst2020-04-091-1/+0
| | | | | | For PSR2 Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Fix (array) indent style to always use one tabChristoph Wurst2020-04-096-13/+13
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update the license headers for Nextcloud 19Christoph Wurst2020-03-312-0/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use the short array syntax, everywhereChristoph Wurst2020-03-262-5/+5
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update license headersChristoph Wurst2019-12-058-8/+11
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Some php-cs fixesRoeland Jago Douma2019-11-226-19/+19
| | | | | | | | | | | * 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>
* adds an --update flag to check-user for manual sync of the ldap recordArthur Schiwon2019-07-181-8/+38
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* LDAP: extend remnants output with "detected on" fieldArthur Schiwon2018-12-211-18/+29
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* LDAP clear cache on config modification also when done via API or CLIArthur Schiwon2018-12-171-0/+5
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Use type casting instead of *val() methodMorris Jobke2018-01-261-2/+2
| | | | | | It should be up to 6x faster Signed-off-by: Morris Jobke <hey@morrisjobke.de>