Commit Graph

59 Commits (fb901b0d93da99b0a49e963a6a35fd82b7051a98)

Author SHA1 Message Date
Côme Chilliet 4130a4cbd8
Make sure to use AccessFactory to create Access instances and use DI
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-10-25 09:52:35 +07:00
Côme Chilliet 91d6e88c2f Add missing file
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-04-01 12:18:03 +07:00
Côme Chilliet 9fc00fdb82 Avoid updating _lastChange when nothing is changed in the configuration
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>
2022-03-31 08:38:05 +07:00
Côme Chilliet 44680b5c3b
Make it explicit that a DN can be used for ldap:check-user
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-02-17 10:00:25 +07:00
Côme Chilliet a6ad06f940
Improve typing in apps/user_ldap/lib/Command/CheckUser.php
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-02-17 09:58:51 +07:00
Côme Chilliet a4f96c18e9
Remove parenthesis around return in apps/user_ldap/lib/Command/CheckUser.php
Co-authored-by: Carl Schwan <carl@carlschwan.eu>

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-02-17 09:58:51 +07:00
Côme Chilliet 75ce9a4832
Fix ldap:check-user method for newly created LDAP users
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-02-17 09:58:28 +07:00
Côme Chilliet 9f2db6e65d
Fix ldap:update-uuid
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>
2022-02-10 10:15:00 +07:00
Arthur Schiwon 45d4c0bf66
add occ command to update UUIDs (incomplete)
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2022-02-10 10:14:59 +07:00
Arthur Schiwon 2bf57cbab8
fix overwriting of SUCCESS and INVALID consts
- already defined in Symfony\Component\Console\Command\Command

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2022-02-03 23:12:51 +07:00
Côme Chilliet 59862f7175
Improve ldap:test-config occ command
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>
2022-01-04 12:17:58 +07:00
Côme Chilliet 3446d9c0b2
Ignore cache in occ ldap:check-ldap command
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>
2021-11-22 16:44:27 +07:00
Christoph Wurst bf564e2a5a
Convert command option defaults to strings
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-06-09 13:25:31 +07:00
John Molakvoæ (skjnldsv) 215aef3cbd
Update php licenses
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2021-06-04 22:02:41 +07:00
Johannes Leuker 9660a3fa90 Add json, yaml output options to ldap:show-config
Signed-off-by: Johannes Leuker <j.leuker@hosting.de>
2021-03-31 12:36:22 +07:00
Arthur Schiwon 1b0355f2c6
adds ldap user:reset command
- 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>
2021-03-17 11:23:48 +07:00
Christoph Wurst d89a75be0b
Update all license headers for Nextcloud 21
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-12-16 18:48:22 +07:00
Joas Schilling 5fba0e562f
Use query builder instead of OC_DB in user_ldap
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-11-06 11:25:28 +07:00
Arthur Schiwon 86e5e7d927
LDAP simplify User_Proxy and Group_Proxy signatures
- 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>
2020-10-23 12:25:31 +07:00
Christoph Wurst d9015a8c94
Format code to a single space around binary operators
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-10-05 20:25:24 +07:00
Christoph Wurst 2a054e6c04
Update the license headers for Nextcloud 20
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-08-24 14:54:25 +07:00
Daniel Kesselberg 7b68f0f326
Remove unexpected argument
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2020-08-10 22:36:30 +07:00
Morris Jobke 3203286f52
Do not use custom DI object names for user_ldap
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-07-13 17:22:19 +07:00
Joas Schilling d7c0b9cced
Also always return in app commands
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-06-26 15:12:11 +07:00
Christoph Wurst cb057829f7
Update license headers for 19
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-29 11:57:22 +07:00
Arthur Schiwon 84619a5b9c
use serverControls directly with LDAP calls, fixes 19127
- 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>
2020-04-14 12:58:28 +07:00
Christoph Wurst caff1023ea
Format control structures, classes, methods and function
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>
2020-04-10 14:19:56 +07:00
Christoph Wurst 14c996d982
Use elseif instead of else if
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 10:35:09 +07:00
Christoph Wurst 41b5e5923a
Use exactly one empty line after the namespace declaration
For PSR2

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 11:48:10 +07:00
Christoph Wurst 2fbad1ed72
Fix (array) indent style to always use one tab
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 10:16:08 +07:00
Christoph Wurst 1a9330cd69
Update the license headers for Nextcloud 19
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-31 14:52:54 +07:00
Christoph Wurst b80ebc9674
Use the short array syntax, everywhere
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-26 16:34:56 +07:00
Christoph Wurst 5bf3d1bb38
Update license headers
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-12-05 15:38:45 +07:00
Roeland Jago Douma 68748d4f85
Some php-cs fixes
* 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>
2019-11-22 20:52:10 +07:00
Arthur Schiwon 40c9a743fa
adds an --update flag to check-user for manual sync of the ldap record
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2019-07-18 14:30:43 +07:00
Arthur Schiwon 85f14bc591
LDAP: extend remnants output with "detected on" field
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2018-12-21 17:24:28 +07:00
Arthur Schiwon feb5366a42
LDAP clear cache on config modification also when done via API or CLI
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2018-12-17 00:31:27 +07:00
Morris Jobke c1e4f9f305
Use type casting instead of *val() method
It should be up to 6x faster

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-01-26 11:35:42 +07:00
Morris Jobke 0eebff152a
Update license headers
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-11-06 16:56:19 +07:00
Vinicius Cubas Brand 10ca793452 Plugins infrastructure in User_LDAP
Signed-off-by: Vinicius Cubas Brand <viniciuscb@gmail.com>
2017-11-03 11:41:40 +07:00
Arthur Schiwon c9622ccb62
fix LDAP User deletion (cleanup)
discovered a bug in the integration test which lead to following a
different code path and giving a false-positive  success feedback.

Also listens now to the evendispatcher instead of old hook system

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-09-29 11:44:04 +07:00
blizzz 42e805f057 Merge pull request #1023 from GitHubUser4234/ldap_password_renew_pr
Handle password expiry in user_ldap
2017-04-24 12:17:04 +07:00
Morris Jobke 1729e4471f
Update comments to Nextcloud
* based on PR by @Ardinis
* see #4311

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-04-11 23:16:27 +07:00
Roger Szabo 5e7723f15c restore ldap_password_renew_pr
Signed-off-by: Roger Szabo <roger.szabo@web.de>
2017-03-31 15:16:22 +07:00
Juan Pablo Villafáñez 9e2e0c4c30
Convert the group limit to match the same behaviour as the user search
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-03-29 12:49:08 +07:00
Arthur Schiwon 689df9a843
LDAP OCS Api for create config
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-01-18 21:13:23 +07:00
Arthur Schiwon 9e817e9e0b
symfony replaced table helper by class, fixes two broken LDAP occ commands
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2016-10-12 23:47:07 +07:00
Roeland Jago Douma bdf4bf4669
DI IConfig into ldap helper
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-10-10 10:18:18 +07:00
Joas Schilling 01cf85e4e5
Fix the User_LDAP app 2016-09-12 16:48:11 +07:00
Joas Schilling 813f0a0f40
Fix apps/ 2016-07-21 18:13:57 +07:00