Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add LDAP test settings command #50567

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

come-nc
Copy link
Contributor

@come-nc come-nc commented Jan 30, 2025

Summary

To help debugging issues related to LDAP configuration, this command shows how Nextcloud sees a specific LDAP user, and if provided an associated group.
This should help debugging situations where group<>member association is not working as expected, and may also help in any situation where LDAP configuration is involved.

Copie d'écran_20250130_120330

Checklist

… getters for backends

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
…tings

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
@come-nc come-nc added the 2. developing Work in progress label Jan 30, 2025
@come-nc come-nc added this to the Nextcloud 32 milestone Jan 30, 2025
@come-nc come-nc self-assigned this Jan 30, 2025
@come-nc come-nc requested a review from blizzz as a code owner January 30, 2025 11:03
@come-nc
Copy link
Contributor Author

come-nc commented Jan 30, 2025

I’m quite happy with current state, only thing I would like to add is clearing the cache maybe?

@blizzz
Copy link
Member

blizzz commented Jan 30, 2025

Nifty stuff 🤩 The execute() method is a bit long maybe.

Clearing the cache is useful, but would give it a new command.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
@sorbaugh sorbaugh requested a review from Altahrim January 30, 2025 13:03
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
@come-nc
Copy link
Contributor Author

come-nc commented Jan 30, 2025

Nifty stuff 🤩 The execute() method is a bit long maybe.

Well yeah but it’s not that easy to break into submethods because there are some early return in there to stop earlier.
The failures could be replaced by Exception throwing but the success are harder to do in a clean way. I will keep it like that to avoid spending too much time on this.

Clearing the cache is useful, but would give it a new command.

I now added a --clearcache option because, especially when used together with --debug-log, it makes a lot of sense to do these tests with a clean cache.

@come-nc come-nc added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Jan 30, 2025
@come-nc come-nc requested review from a team, skjnldsv and provokateurin and removed request for a team January 30, 2025 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add debug occ command to check that the LDAP group membership is correctly configured
2 participants