Remove group from excluded_groups_list after delete
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
This commit is contained in:
parent
703d716a32
commit
16da29caba
|
@ -1511,6 +1511,19 @@ class Manager implements IManager {
|
||||||
public function groupDeleted($gid) {
|
public function groupDeleted($gid) {
|
||||||
$provider = $this->factory->getProviderForType(\OCP\Share::SHARE_TYPE_GROUP);
|
$provider = $this->factory->getProviderForType(\OCP\Share::SHARE_TYPE_GROUP);
|
||||||
$provider->groupDeleted($gid);
|
$provider->groupDeleted($gid);
|
||||||
|
|
||||||
|
$excludedGroups = $this->config->getAppValue('core', 'shareapi_exclude_groups_list', '');
|
||||||
|
if ($excludedGroups === '') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$excludedGroups = json_decode($excludedGroups, true);
|
||||||
|
if (json_last_error() !== JSON_ERROR_NONE) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$excludedGroups = array_diff($excludedGroups, [$gid]);
|
||||||
|
$this->config->setAppValue('core', 'shareapi_exclude_groups_list', json_encode($excludedGroups));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue