diff options
author | Daniel Kesselberg <mail@danielkesselberg.de> | 2020-01-24 16:34:07 +0100 |
---|---|---|
committer | Daniel Kesselberg <mail@danielkesselberg.de> | 2020-05-17 15:15:06 +0200 |
commit | 16da29caba1cefa4c0762fae6014d6d2c737ee94 (patch) | |
tree | cb578db3540a324fadc2b2f07f0905b972f7f414 | |
parent | 703d716a32e08d0bc594ba5572452044c5fb3022 (diff) | |
download | nextcloud-server-16da29caba1cefa4c0762fae6014d6d2c737ee94.tar.gz nextcloud-server-16da29caba1cefa4c0762fae6014d6d2c737ee94.zip |
Remove group from excluded_groups_list after delete
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
-rw-r--r-- | lib/private/Share20/Manager.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/private/Share20/Manager.php b/lib/private/Share20/Manager.php index 004076db493..36cbd511b8d 100644 --- a/lib/private/Share20/Manager.php +++ b/lib/private/Share20/Manager.php @@ -1511,6 +1511,19 @@ class Manager implements IManager { public function groupDeleted($gid) { $provider = $this->factory->getProviderForType(\OCP\Share::SHARE_TYPE_GROUP); $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)); } /** |