Côme Chilliet
9cf3d2433b
feat(user_ldap): Add a --clearcache option to ldap:test-user-settings
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Max <max@nextcloud.com>
2025-03-24 14:10:05 +07:00
Côme Chilliet
39a1cda8b9
fix(user_ldap): Remove redundant if check
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-03-24 14:08:59 +07:00
Côme Chilliet
f9bb4a7d23
feat(user_ldap): Add command test-user-settings to test LDAP user settings
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-03-24 14:08:58 +07:00
Côme Chilliet
96cb85efdb
feat(user_ldap): upstream common code into Proxy class and add public getters for backends
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-03-24 14:08:45 +07:00
Côme Chilliet
5c0011aaad
fix(user_ldap): Improve typing and fix a var name
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-03-24 10:45:21 +07:00
Côme Chilliet
f46cd7aaab
fix: Fix newly spotted psalm issues, add exhaustive typed magic properties for LDAP classes
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-03-24 10:45:21 +07:00
Côme Chilliet
728957cd23
chore: composer run cs:fix
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-03-24 10:45:21 +07:00
Côme Chilliet
34134c1a77
fix(user_ldap): Lowercase value for all attributes in configuration
...
Avoid surprises by making sure these are lowercased apart from
documented special case user displayname.
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-03-24 10:45:21 +07:00
Côme Chilliet
c94fe15be5
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>
2025-03-24 10:45:21 +07:00
Côme Chilliet
380e7a599e
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>
2025-03-24 10:45:21 +07:00
Joas Schilling
c63c27d8d5
fix(l10n): Improve english source strings
...
- No leading/trailing whitespace
- Use asci single quote
Signed-off-by: Joas Schilling <coding@schilljs.com>
2025-02-26 15:27:20 +07:00
Côme Chilliet
b5da20e166
fix(user_ldap): Do not map groups we do not know if they match filter
...
When nesting is enabled, filterValidGroups is supposed to check for each
groups if it actually exist, because it may not be visible to
Nextcloud. So in this codepath we disable automapping of groups.
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
(cherry picked from commit de77415c70 )
2025-01-28 13:24:45 +07:00
provokateurin
c8dbb119c7
fix(BackgroundJobs): Adjust intervals and time sensitivities
...
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-11-25 08:40:57 +07:00
Arthur Schiwon
89cfc7c2a5
fix(LDAP): check index before accessing it
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2024-09-12 10:55:34 +07:00
Arthur Schiwon
38cfe2e861
fix(LDAP): remove unneeded dependencies
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2024-08-01 21:12:26 +07:00
Côme Chilliet
cbaba872e1
fix: Only list remnants as disabled if option is enabled
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-06-11 18:16:08 +07:00
John Molakvoæ
81459eaceb
fix: php lint
...
Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
Signed-off-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
2024-06-07 12:11:56 +07:00
Robin Appelman
54ee9d714b
unmark deleted users if their last login date is more recent than deleted date
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-06-07 12:11:56 +07:00
Côme Chilliet
27e6f27b7c
fix: Also search in email field for disabled users
...
To match what is done for Database backend for enabled users
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-05-27 14:58:49 +07:00
Côme Chilliet
29e7294d9b
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-27 14:58:43 +07:00
yemkareems
8f24109572
fix: add ldap_exop_passwd function to sensitive value
...
Signed-off-by: yemkareems <yemkareems@gmail.com>
2024-05-16 12:23:12 +07:00
Côme Chilliet
d9a8b121f6
fix(user_ldap): Fix a var name
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-04-30 11:01:21 +07:00
Arthur Schiwon
7612eb820f
docs(LDAP): add info on stored DN form
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2024-04-10 10:03:14 +07:00
Arthur Schiwon
3ce8879d09
fix(LDAP): escape DN on check-user
...
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>
2024-04-10 10:03:14 +07:00
Côme Chilliet
0b332ceac2
fix: Apply new coding standard to all files
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-04-04 11:45:22 +07:00
Côme Chilliet
2874dff773
fix(user_ldap): Early failure for empty password login attempt
...
This avoids user_ldap logging about an invalid configuration with an
empty password when the empty password actually comes from a login
attempt.
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-03-06 16:47:16 +07:00
Côme Chilliet
827269f5b8
Merge pull request #43764 from nextcloud/fix/user_ldap-ignore-unserialize-errors-in-migration
...
fix(user_ldap): Ignore unserialize error in group membership migration
2024-03-06 13:04:20 +07:00
Côme Chilliet
d16334774a
fix(user_ldap): Catch DB Exceptions when updating group memberships
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-03-06 10:19:38 +07:00
Côme Chilliet
875d0a27b0
fix(user_ldap): Ignore unserialize error in group membership migration
...
The memberships will be checked by the background job later and data
will be added to the table anyway.
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-03-06 10:18:16 +07:00
Joas Schilling
92fc12918e
fix(migrations): Help developers to add description and copyright info
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2024-03-05 12:56:38 +07:00
F. E Noel Nfebe
3fb1674251
Merge pull request #43461 from nextcloud/fix/get-rid-of-getlogger
...
chore: Migrate away from OC::$server->getLogger
2024-02-14 10:47:22 +07:00
Vincent Petry
839ddaa354
feat: rename users to account or person
...
Replace translated text in most locations
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2024-02-13 21:06:30 +07:00
Côme Chilliet
c0ce272e9c
chore: Migrate away from OC::$server->getLogger
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-02-13 17:32:30 +07:00
Côme Chilliet
303e2febc7
Merge pull request #43387 from nextcloud/fix/migrate-away-from-ilogger-in-jobs
2024-02-08 18:27:44 +07:00
Louis Chemineau
898df41de9
Revert "Merge branch 'master' of github.com:nextcloud/server"
...
This reverts commit d9d60238c7 , reversing
changes made to ba3fdb0cdc .
2024-02-08 15:31:19 +07:00
Côme Chilliet
166773879b
fix!: Migrate jobs away from deprecated interfaces
...
BREAKING CHANGE: Removed ILogFactory::getCustomLogger deprecated method
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-02-08 10:28:29 +07:00
Faraz Samapoor
e6a4ebcc92
Update apps/user_ldap/lib/Command/Search.php
...
Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
Signed-off-by: Faraz Samapoor <f.samapoor@gmail.com>
2024-02-06 10:02:11 +07:00
Faraz Samapoor
f03781b509
Refactors user_ldap app commands.
...
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>
2024-02-06 10:02:11 +07:00
Côme Chilliet
b2e9e0fa0d
chore: Replace OC::$server->getL10N by OCP\Util::getL10N in lib and some apps
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-02-05 11:16:04 +07:00
Ferdinand Thiessen
b8fbd7721d
fix(user_ldap): Ensure host is a string when checking if `ldapi`
...
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-01-26 14:53:32 +07:00
provokateurin
88f7d5bf84
chore(deps): Update openapi-extractor
...
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-01-18 16:00:18 +07:00
Côme Chilliet
658b20aef5
Fix crash of login in case of duplicated group membership
...
If several LDAP configurations return the same group id for a user it
should still only appear once in the return of getUserGroups
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-01-15 09:39:59 +07:00
Côme Chilliet
6d0f0fc01b
Fix upgrade of user_ldap when oc_group_members contains duplicated uids
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-01-04 11:51:33 +07:00
Arthur Schiwon
ee096f8629
fix(LDAP): ensure stored groups are formatted as simple list
...
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>
2023-12-20 17:05:58 +07:00
Pytal
294330454b
Merge pull request #40169 from nextcloud/enh/load-disabled-users-directly
...
enh(settings): Load from disabled users endpoint
2023-12-01 08:42:04 +07:00
Arthur Schiwon
37237dc183
feat(LDAP): warn about demoting a group while promoting another
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2023-12-01 12:48:24 +07:00
Arthur Schiwon
18e6c9f5bc
enh(LDAP): add occ command to promote an LDAP group to admin
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2023-12-01 12:48:24 +07:00
Arthur Schiwon
d6b356c63b
enh(LDAP): implement IIsAdmin interface
...
- add configuration to specify one LDAP group acting as admin group (CLI)
- implement `isAdmin()` method, basically relying on inGroup against the
configured group
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2023-12-01 12:48:24 +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
Joas Schilling
aa5f037af7
chore: apply changes from Nextcloud coding standards 1.1.1
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
2023-11-23 10:36:13 +07:00