Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2020-05-18 15:24:18 +0300
committerGitHub <noreply@github.com>2020-05-18 15:24:18 +0300
commit1bba7de28f9b44d4160209bc0e849a19d940b877 (patch)
treec967128aa5d829ab84916afe5c9dc2b35fae9016 /lib
parent73f58483da943deebf04ef02c8cef1ee5b8cfba7 (diff)
parent16da29caba1cefa4c0762fae6014d6d2c737ee94 (diff)
Merge pull request #21017 from nextcloud/enh/noid/clean-excluded-groups-list
Remove group from excluded_groups_list after delete
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Share20/Manager.php13
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));
}
/**