Commit graph

1324 commits

Author SHA1 Message Date
Louis Chmn
291ec1e474 fix(user_ldap): Fix activation enforcement when testing the config
Signed-off-by: Louis Chmn <louis@chmn.me>
2025-12-04 17:16:21 +00:00
Côme Chilliet
7eefd725db fix(user_ldap): Do not use variables directly in translation strings
I simply removed translations for exceptions which are never supposed to
 happen apart from API misuse or code bug.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-12-01 10:40:50 +01:00
Louis Chmn
1e17a9fe7a refactor(user_ldap): Migrate to Vue3
Signed-off-by: Louis Chmn <louis@chmn.me>
2025-11-25 13:36:23 +01:00
Côme Chilliet
c62166241a chore(user_ldap): Remove ajax endpoints
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Louis Chmn <louis@chmn.me>
2025-11-21 14:23:58 +01:00
Côme Chilliet
28cef3ed6b fix(ldap): Add OCS route for clearing mapping without using ajax
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Louis Chmn <louis@chmn.me>
2025-11-21 14:23:58 +01:00
Côme Chilliet
c414a7bdf8 fix: Fix documentation for controllers and update openapi.json
Also removed save action from WizardController as there is already a
 route in ConfigApiController to save a configuration.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Louis Chmn <louis@chmn.me>
2025-11-21 14:23:57 +01:00
Côme Chilliet
ac078b6e68 chore: Fix typing in WizardResult
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Louis Chmn <louis@chmn.me>
2025-11-21 14:23:57 +01:00
Côme Chilliet
9d41d8172b fix(ldap): Fix wizard controller action route
It seems naming a route parameter $action causes issue, so renamed it to
 $wizardAction.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Louis Chmn <louis@chmn.me>
2025-11-21 14:23:57 +01:00
Côme Chilliet
a0e5548e49 feat(user_ldap): Add a wizard OCS API
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Louis Chmn <louis@chmn.me>
2025-11-21 14:23:57 +01:00
Côme Chilliet
36475f2461 fix(user_ldap): Add OCS endpoint for copying configurations
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Louis Chmn <louis@chmn.me>
2025-11-21 14:23:57 +01:00
Côme Chilliet
e842874a0a fix(user_ldap): Add OCS endpoint for testing configurations
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Louis Chmn <louis@chmn.me>
2025-11-21 14:23:57 +01:00
Carl Schwan
4d47fdaa85 chore: Run rector with new rules for fetch
Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
2025-11-18 17:45:57 +01:00
Arthur Schiwon
57cb905580
fix(LDAP): drop hard base checks for now
The migration path is hard and unexpected. We can follow-up with a soft
setup check instead for a while, but needs to be discussed.

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2025-10-29 18:21:45 +01:00
Arthur Schiwon
49f1c3f00e
refactor(LDAP): switch from prepares statement to query builder
- has the advantage that queries will be reported in the query.log when
  configured

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2025-10-17 11:09:31 +02:00
Arthur Schiwon
155b75027c
feat: locally cache frequently requested LDAP mapping data
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2025-10-17 11:09:31 +02:00
Arthur Schiwon
fbd29bcf7f
fix(LDAP): properly disable are require TLS certificate verification
- the old approach lead connection issues, as ldap_set_option was called
  too late. Specifically it needs to be called before ldap_connect and set
  globally!
- The old approach also connected it to the ldapTLS configuration, which
  has a misleading naming. It indicates StartTLS usage only, not plain TLS
  connections.

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2025-10-09 20:22:37 +02:00
Côme Chilliet
723a3f0b96
fix(ldap): Fix copying and creating LDAP configuration
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-10-06 15:45:23 +02:00
Kate
52aed034b1
Merge pull request #55431 from nextcloud/fix/ocscontroller-usage 2025-10-01 10:43:21 +02:00
Louis Chemineau
87cb225668
refactor(user_ldap): Rewrite setup wizard
Signed-off-by: Louis Chemineau <louis@chmn.me>
2025-09-30 22:49:43 +02:00
provokateurin
13e98dce15 fix: Use the correct OCSController
Signed-off-by: provokateurin <kate@provokateurin.de>
2025-09-30 16:51:51 +02:00
Ferdinand Thiessen
660f3f6fd1
refactor: use logical && || instead of weak and or operators
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-09-27 23:02:18 +02:00
Joas Schilling
1d43f6b4a9
Merge pull request #53714 from Mark-PAS/master
Only attempt $result array access if array not empty.
2025-07-14 11:25:27 +02:00
Ferdinand Thiessen
5981b7eb51
chore: apply new CSFixer rules
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>

# Conflicts:
#	apps/settings/lib/SetupChecks/PhpOpcacheSetup.php
2025-07-01 16:26:50 +02:00
Mark
b04760af6e Only attempt $result array access if array not empty.
Signed-off-by: Mark <mark@perkinsadministrationservices.com.au>
2025-07-01 07:44:20 +09:30
Côme Chilliet
f48e5aa1f3
fix(user_ldap): Switch to OCP\IAppConfig and fix Helper constructor calls
Using OCP\AppFramework\Services\IAppConfig is not possible because the
 Helper is queried from places outside of the application DI container
(ajax pages, tests, other applications through ILDAPProviderFactory…)

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-06-10 16:08:52 +02:00
Côme Chilliet
bc7309ca1c
fix(user_ldap): Store the list of used configuration prefixed in appconfig
This avoids getting all keys from appconfig, which was triggering
 loading of lazy configuration on all requests.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-06-10 16:08:45 +02:00
Côme Chilliet
6da579fb1d
fix(user_ldap): Harmonize parameter obfuscation and serialization accross logging methods
Debug log, profiler and ldap debug log had a different logic for
 sanitizing of parameters, aligning them.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-06-02 11:47:56 +02:00
provokateurin
78a175fc74
refactor: Apply rector refactorings
Signed-off-by: provokateurin <kate@provokateurin.de>
2025-05-14 15:29:02 +02:00
Ferdinand Thiessen
1ae3fa4003
chore: replace leagcy OC_Helper calls with OCP\Util
- Replace legacy calls with OCP\Util
- Add missing deprecation notices
- Inline implementation in OCP\Util and call it from OC_Helper

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-05-14 10:18:04 +02:00
Arthur Schiwon
1eb9000b0d
fix(LDAP): inlcude ldapExpertUsernameAttr in general attribute list
fixes corner cases in which an LDAP record might be loaded and used,
where the user is still not mapped - and then this information is
missing though expected.

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2025-04-17 17:00:31 +02:00
Côme Chilliet
0cf4f3cc71
fix: Replace all usages of OC_User backend method calls by IUserManager
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-04-10 11:29:21 +02:00
Ferdinand Thiessen
5211448940
fix(l10n): put placeholder like string into variable
Otherwise this is wrongly handled by our translation community.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-04-07 18:39:40 +02:00
Côme Chilliet
f033ef7c18 fix: Migrate all uses of OCP\Template to OCP\Template\ITemplateManager
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-03-06 15:49:25 +01:00
Arthur Schiwon
4fe518a57b
Merge pull request #51096 from nextcloud/fix/noid/ldap-setopt-for-disabling-certcheck
fix(LDAP): use ldap_set_option over putenv to disable cert check
2025-03-06 13:00:08 +01:00
Côme Chilliet
71759bf856
feat: Add bases and gidNumber attribute to ldap:test-user-settings output
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-03-04 10:05:50 +01:00
Arthur Schiwon
939a8d5ea5
fix(LDAP): use ldap_set_option over putenv to disable cert check
the putenv option was not working reliable anymore anyway

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2025-03-03 12:53:24 +01:00
Daniel Kesselberg
7facae6b83
fix: remove caching in fetchListOfGroups
When using nested groups without a memberof overlay, then fetchListOfGroups is called from getGroupsByMember without applying the group filter.

In some setups, the "unfiltered" result is then written back to the group mapping table. That might cause random "An administrator removed you from group" activities.

I was unable to replicate it locally, but we got the feedback that the random activities stopped with the patch applied.

Ref: https://github.com/nextcloud/server/issues/42195

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2025-02-27 12:02:44 +01:00
Joas Schilling
095ab4419e
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 09:54:32 +01:00
Côme Chilliet
36d756ab0f fix(user_ldap): Check that all user and group bases are in the global one
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-02-25 22:18:18 +01:00
Côme Chilliet
0d35a3df02 fix(user_ldap): Add missing use in ajax endpoint and fix L10N injection
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-02-25 22:18:18 +01:00
Côme Chilliet
7629d4df17 feat(user_ldap): Improve error detail when saving an incorrect configuration
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-02-25 22:18:18 +01:00
Côme Chilliet
64863c9d46
chore: Apply new rector configuration to apps folder
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-02-13 11:46:42 +01:00
Côme Chilliet
7fa117dd0f
feat(user_ldap): Add a --clearcache option to ldap:test-user-settings
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-01-30 15:07:15 +01:00
Côme Chilliet
e094602311
fix(user_ldap): Remove redundant if check
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-01-30 13:47:09 +01:00
Côme Chilliet
1098ef3b69
feat(user_ldap): Add command test-user-settings to test LDAP user settings
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-01-30 11:55:43 +01:00
Côme Chilliet
e55806b546
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-01-30 11:49:58 +01:00
Côme Chilliet
de77415c70
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>
2025-01-27 14:51:51 +01:00
Arthur Schiwon
0815aa0591
fix(LDAP): also log why the connection to main server failed
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2025-01-24 18:55:10 +01:00
Arthur Schiwon
2de855f0bc
Merge pull request #50162 from nextcloud/fix/improve-ldap-avatar-handling
Improve ldap avatar handling
2025-01-16 21:43:29 +01:00
Côme Chilliet
e187e4e87f
feat(updatenotification): Add a limit to user count from LDAP so save performances
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-01-14 12:26:24 +01:00