mirror of
https://github.com/nextcloud/server.git
synced 2026-02-20 00:12:30 -05:00
feat(user_ldap): Add a --clearcache option to ldap:test-user-settings
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
parent
e094602311
commit
7fa117dd0f
1 changed files with 9 additions and 0 deletions
|
|
@ -46,6 +46,12 @@ class TestUserSettings extends Command {
|
|||
InputOption::VALUE_REQUIRED,
|
||||
'A group DN to check if the user is a member or not'
|
||||
)
|
||||
->addOption(
|
||||
'clearcache',
|
||||
null,
|
||||
InputOption::VALUE_NONE,
|
||||
'Clear the cache of the LDAP connection before the beginning of tests'
|
||||
)
|
||||
;
|
||||
}
|
||||
|
||||
|
|
@ -54,6 +60,9 @@ class TestUserSettings extends Command {
|
|||
$uid = $input->getArgument('user');
|
||||
$access = $this->backend->getLDAPAccess($uid);
|
||||
$connection = $access->getConnection();
|
||||
if ($input->getOption('clearcache')) {
|
||||
$connection->clearCache();
|
||||
}
|
||||
$configPrefix = $connection->getConfigPrefix();
|
||||
$knownDn = '';
|
||||
if ($access->stringResemblesDN($uid)) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue