Côme Chilliet
d2bc636a79
fix(user_ldap): Correctly cache that user exists to avoid a request on mapping new user
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-08-27 10:06:43 +07:00
Côme Chilliet
4fb1d2f3e5
fix(user_ldap): Avoid extra LDAP request when mapping a user for the first time
...
Avoids using several LDAP searches to get UUID, display name and
internal name, now gets all attributes at the same time.
Also avoids extra request to build an unused user object in userExists.
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-08-27 10:05:12 +07:00
Daniel Kesselberg
af6de04e9e
style: update codestyle for coding-standard 1.2.3
...
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2024-08-25 19:34:58 +07:00
Akhil
b1230cd53d
Use cache in LDAP backend's checkPassword
...
Signed-off-by: Akhil <akhil@e.email>
2024-08-16 17:55:47 +07:00
Arthur Schiwon
0447aa4e62
fix(LDAP): remove unneeded dependencies
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2024-08-01 20:13:11 +07:00
Andy Scherzinger
8d8891c5bc
chore: Add SPDX header
...
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2024-05-30 15:49:33 +07:00
Côme Chilliet
6d56f3557d
feat: Add back searching in disabled user list
...
When disabled users where moved to their own endpoint we overlooked
search, so adding it back.
The search is done case-insensitive in uid and display name.
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-05-23 09:08:31 +07:00
Côme Chilliet
0f348516d2
fix: Remove obsolete resource typing
...
In PHP>=8.1, LDAP and FTP resources are always typed objects
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-04-09 10:01:47 +07:00
Côme Chilliet
adc43eae9b
Invert parameter order in getDisabledUserList to be consistent
...
This matches what was done in the calls and so fixes getting disabled
user list when there are several backends returning disabled users.
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-11-30 17:15:12 +07:00
Côme Chilliet
189ccc2d72
Add method to list disabled users to IProvideEnabledStateBackend
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-06-29 16:15:12 +07:00
Côme Chilliet
1603cdc8d2
Fix since annotations and add boolean return type for setUserEnabled
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-06-20 15:10:39 +07:00
Côme Chilliet
add59d2309
Use DI for DeletedUsersIndex and fix tests
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-05-25 12:18:28 +07:00
Côme Chilliet
50ccfb4f5b
[user_ldap] Add per-connection setting for marking remnants as disabled
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-05-23 16:03:17 +07:00
Côme Chilliet
684a81e4bd
Use the new IProvideEnabledStateBackend interface in user_ldap
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-05-23 11:25:22 +07:00
Robin Appelman
3a9597fd1b
also unmark deleted ldap user when checking the ldap entry
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-03-02 16:22:17 +07:00
Côme Chilliet
341dda1de6
Merge branch 'master' into fix/clean-ldap-access-factory-usage
...
Signed-off-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
2022-11-21 16:05:17 +07:00
Côme Chilliet
556e3c84e6
Fix return type for countUsers method
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-10-25 10:20:09 +07:00
Côme Chilliet
142f9913a6
Expose mapped user count from LDAP and use that for user limit check
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-10-24 16:54:41 +07:00
Carl Schwan
1bf5ab35a8
Use "use" to import namespaces
...
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-03-14 09:35:01 +07:00
Carl Schwan
8d7380a15d
Fix psalm issue about userCounts
...
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-03-11 14:17:29 +07:00
Côme Chilliet
f3dcbfe146
Fix PHP 8.1 support for user_ldap application
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-12-16 09:43:30 +07:00
Côme Chilliet
f932766acf
Check LDAP upon user deletion instead of refusing based on cached information
...
This should avoid having to wait for background job to run after
deleting a user in LDAP before being able to delete it in Nextcloud.
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-11-23 10:59:13 +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
Côme Chilliet
f9e6f2ea57
Use Psr\Log\LoggerInterface where it can easily be used in user_ldap
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-10-14 14:12:03 +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
Joas Schilling
3379e69ecc
Fix parameter types in docs
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-03-17 09:51:31 +07:00
Arthur Schiwon
4edf8630c4
clear LDAP cache after user deletion
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2020-06-08 17:52:43 +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
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
afbd9c4e6e
Unify function spacing to PSR2 recommendation
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 13:54:22 +07:00
Christoph Wurst
85e369cddb
Fix multiline comments
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-08 22:24:54 +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
Arthur Schiwon
5cae135b94
decouple userExists from userExistsOnLDAP check
...
allows to mark users as offline right away, avoids a gap of being not a
user and causing weird side effects
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2020-01-08 09:21:22 +07:00
Arthur Schiwon
411a47cadb
relax strict getHome behaviour for LDAP users in a shadow state
...
* 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>
2020-01-08 09:21:21 +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
Arthur Schiwon
108227ca6c
invalidates user when plugin reported deletion success
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2019-06-26 14:18:28 +07:00
Arthur Schiwon
660fbd64e3
ensures mapping of chosen userid
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2019-06-19 17:02:28 +07:00
Arthur Schiwon
a1f2dbe29c
caches the displayname after an LDAP plugin set it
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2019-06-18 12:42:03 +07:00
Arthur Schiwon
518998093f
set the loglevel in context, save the condition
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2019-04-02 22:52:12 +07:00
Vinicius Cubas Brand
61572a5b2e
LDAP plugin: force createUser to return new user's DN
...
LDAP plugins must change the createUser method to return the DN, as we
need this to update the cache.
Signed-off-by: Vinicius Cubas Brand <viniciuscb@gmail.com>
2019-03-21 10:20:46 +07:00
Vinicius Cubas Brand
c4dbc428f9
fix user creation using LDAP Plugin
...
Signed-off-by: Vinicius Cubas Brand <viniciuscb@gmail.com>
2019-03-21 10:20:46 +07:00
Daniel Kesselberg
2d30511fa6
Check if user is null before getUsername
...
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2018-09-16 19:33:03 +07:00
Arthur Schiwon
b497b06867
don't force LDAP updates on userExists anymore
...
and remove some deprecated code
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2018-08-14 17:57:24 +07:00
Arthur Schiwon
343036e55c
allow admin to disable fetching of avatars as well as a specific attribute
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2018-07-05 11:12:51 +07:00
Arthur Schiwon
a4dda465c2
let user set avatar in nextcloud von LDAP provides invalid image data
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2018-07-03 01:45:07 +07:00
Arthur Schiwon
38a90130ce
move log constants to ILogger
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2018-04-26 10:45:52 +07:00
Arthur Schiwon
373a1d5391
more consistent naming
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2018-04-05 12:46:15 +07:00
Arthur Schiwon
8fe914f07e
LDAP backend to emit announce and revoke signals on mapping changes
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2018-04-05 12:38:39 +07:00
Morris Jobke
a661f043e1
Remove unneeded semicolon and parentheses
...
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-01-26 23:46:40 +07:00