Skip to content

Commit

Permalink
fix(Share20\Manager): Propagate user and group deletion to remote sha…
Browse files Browse the repository at this point in the history
…re providers

Signed-off-by: provokateurin <[email protected]>
  • Loading branch information
provokateurin committed Mar 4, 2025
1 parent 3ca39e3 commit b51aad4
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions lib/private/Share20/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -1665,8 +1665,14 @@ public function userDeleted($uid) {
* @inheritdoc
*/
public function groupDeleted($gid) {
$provider = $this->factory->getProviderForType(IShare::TYPE_GROUP);
$provider->groupDeleted($gid);
foreach ([IShare::TYPE_GROUP, IShare::TYPE_REMOTE_GROUP] as $type) {
try {
$provider = $this->factory->getProviderForType($type);
} catch (ProviderException $e) {
continue;
}
$provider->groupDeleted($gid);
}

$excludedGroups = $this->config->getAppValue('core', 'shareapi_exclude_groups_list', '');
if ($excludedGroups === '') {
Expand All @@ -1686,8 +1692,14 @@ public function groupDeleted($gid) {
* @inheritdoc
*/
public function userDeletedFromGroup($uid, $gid) {
$provider = $this->factory->getProviderForType(IShare::TYPE_GROUP);
$provider->userDeletedFromGroup($uid, $gid);
foreach ([IShare::TYPE_GROUP, IShare::TYPE_REMOTE_GROUP] as $type) {
try {
$provider = $this->factory->getProviderForType($type);
} catch (ProviderException $e) {
continue;
}
$provider->userDeletedFromGroup($uid, $gid);
}
}

/**
Expand Down

0 comments on commit b51aad4

Please sign in to comment.