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

Improve error detail when saving an incorrect LDAP config #50475

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

Conversation

come-nc
Copy link
Contributor

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

  • Resolves: #

Summary

  • Show what is the error when validating a configuration in the LDAP settings
  • Check that user base and group base are under the root base

Checklist

@come-nc come-nc added this to the Nextcloud 32 milestone Jan 27, 2025
@come-nc come-nc self-assigned this Jan 27, 2025
@come-nc
Copy link
Contributor Author

come-nc commented Jan 28, 2025

Configuration validation is weird.

  1. For an invalid configuration, it happens on each get/set, so it will spam the logs
  2. The configuration is saved before being checked, so it is saved even if not valid (there is not save button)
  3. If you click "test configuration" too fast after a change, it actually tests the previous version of the configuration, before the change.

But all of that was already like that before this PR, so I still think the PR makes sense.

@come-nc come-nc force-pushed the enh/ldap-clearer-errors branch from 6fc7454 to 2f820da Compare February 18, 2025 15:10
@come-nc come-nc added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Feb 18, 2025
@come-nc come-nc requested review from blizzz and artonge February 18, 2025 15:39
@come-nc come-nc requested review from a team, icewind1991, Altahrim and nfebe and removed request for a team February 20, 2025 17:05
}
if ($configurationOk) {
try {
$connection->setConfiguration($conf, throw:true);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$connection->setConfiguration($conf, throw:true);
$connection->setConfiguration($conf, throw: true);

I expected linter to ask for ^ but it does not 😲

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants