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.
| 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.
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.