mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
Fix check-group --update for deleted groups
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
parent
5425f7d3bd
commit
b8a0954f55
1 changed files with 10 additions and 2 deletions
|
|
@ -100,11 +100,19 @@ class CheckGroup extends Command {
|
|||
$output->writeln('The group is still available on LDAP.');
|
||||
if ($input->getOption('update')) {
|
||||
$this->backend->getLDAPAccess($gid)->connection->clearCache();
|
||||
$this->updateGroup($gid, $output, $wasMapped);
|
||||
if ($wasMapped) {
|
||||
$this->service->handleKnownGroups([$gid]);
|
||||
} else {
|
||||
$this->service->handleCreatedGroups([$gid]);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
} elseif ($wasMapped) {
|
||||
$output->writeln('The group does not exists on LDAP anymore.');
|
||||
$output->writeln('The group does not exist on LDAP anymore.');
|
||||
if ($input->getOption('update')) {
|
||||
$this->backend->getLDAPAccess($gid)->connection->clearCache();
|
||||
$this->service->handleRemovedGroups([$gid]);
|
||||
}
|
||||
return 0;
|
||||
} else {
|
||||
throw new \Exception('The given group is not a recognized LDAP group.');
|
||||
|
|
|
|||
Loading…
Reference in a new issue