-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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 IProvideEnabledStateBackend interface #34443
Conversation
6ef2147
to
41caf05
Compare
Rebased and fixed conflicts. @blizzz Should the configuration be global like implemented or for each ldap configuration? If we want to put in the UI we have to set it as a per-configuration setting anyway, no? |
We can also add another section with global LDAP settings. We have a few of them, but none are exposed. Is there a scenario where different settings per config make sense? For me it makes more sense as a global flag, otherwise we are inconsistent across configs, potentially resulting in confused admins. |
Well I don’t know, a per-configuration setting can always be configured the same way for all configurations while if we make it a global setting people are stuck with it. But I have to say I do not have a particular usecase in mind. Do we have a list of global settings that would make sense to appear in that UI? |
By the power of
For completeness:
Then we also have system keys (config.php):
|
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
41caf05
to
50ccfb4
Compare
Rebased and added the option to the UI. |
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* @param callable():bool $queryDatabaseValue A callable to query the enabled state from database | ||
* @param callable(bool):void $setDatabaseValue A callable to set the enabled state in the database. | ||
*/ | ||
public function setUserEnabled(string $uid, bool $enabled, callable $queryDatabaseValue, callable $setDatabaseValue): void; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public function setUserEnabled(string $uid, bool $enabled, callable $queryDatabaseValue, callable $setDatabaseValue): void; | |
public function setUserEnabledState(string $uid, bool $enabled, callable $queryDatabaseValue, callable $setDatabaseValue): void; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’d prefer to keep setUserEnabled
wording, to match existing OCP\IUser::setEnabled
.
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
So, since I started working on this I discovered we have no method to list disabled users. |
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Done. |
/backport to stable26 |
This allows user backends to present some users as disabled, and to manage themselves how disabling users works.
It is used in the LDAP backend to support a new option to make remnants users appear as disabled.