Skip to content

Commit b51aad4

Browse files
committed
fix(Share20\Manager): Propagate user and group deletion to remote share providers
Signed-off-by: provokateurin <[email protected]>
1 parent 3ca39e3 commit b51aad4

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

lib/private/Share20/Manager.php

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1665,8 +1665,14 @@ public function userDeleted($uid) {
16651665
* @inheritdoc
16661666
*/
16671667
public function groupDeleted($gid) {
1668-
$provider = $this->factory->getProviderForType(IShare::TYPE_GROUP);
1669-
$provider->groupDeleted($gid);
1668+
foreach ([IShare::TYPE_GROUP, IShare::TYPE_REMOTE_GROUP] as $type) {
1669+
try {
1670+
$provider = $this->factory->getProviderForType($type);
1671+
} catch (ProviderException $e) {
1672+
continue;
1673+
}
1674+
$provider->groupDeleted($gid);
1675+
}
16701676

16711677
$excludedGroups = $this->config->getAppValue('core', 'shareapi_exclude_groups_list', '');
16721678
if ($excludedGroups === '') {
@@ -1686,8 +1692,14 @@ public function groupDeleted($gid) {
16861692
* @inheritdoc
16871693
*/
16881694
public function userDeletedFromGroup($uid, $gid) {
1689-
$provider = $this->factory->getProviderForType(IShare::TYPE_GROUP);
1690-
$provider->userDeletedFromGroup($uid, $gid);
1695+
foreach ([IShare::TYPE_GROUP, IShare::TYPE_REMOTE_GROUP] as $type) {
1696+
try {
1697+
$provider = $this->factory->getProviderForType($type);
1698+
} catch (ProviderException $e) {
1699+
continue;
1700+
}
1701+
$provider->userDeletedFromGroup($uid, $gid);
1702+
}
16911703
}
16921704

16931705
/**

0 commit comments

Comments
 (0)