Skip to content

Commit be82863

Browse files
Merge pull request #4363 from nextcloud/backport/4360/stable31
2 parents dbbee10 + bba5d32 commit be82863

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

β€Žlib/Folder/FolderManager.phpβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -488,9 +488,9 @@ private function getCircles(int $id): array {
488488
* app or is member of a group that can manage permissions for the specific folder.
489489
* @throws Exception
490490
*/
491-
public function canManageACL(int $folderId, IUser $user): bool {
491+
public function canManageACL(int $folderId, IUser $user, bool $excludeAdmins = false): bool {
492492
$userId = $user->getUId();
493-
if ($this->groupManager->isAdmin($userId)) {
493+
if (!$excludeAdmins && $this->groupManager->isAdmin($userId)) {
494494
return true;
495495
}
496496

β€Žlib/Trash/TrashBackend.phpβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ private function getTrashForFolders(IUser $user, array $folders): array {
443443

444444
$trashFolder = $this->rootFolder->get('/' . $user->getUID() . '/files_trashbin/groupfolders/' . $folderId);
445445
$content = $trashFolder->getDirectoryListing();
446-
$userCanManageAcl = $this->folderManager->canManageACL($folderId, $user);
446+
$userCanManageAcl = $this->folderManager->canManageACL($folderId, $user, true);
447447
$this->aclManagerFactory->getACLManager($user)->preloadRulesForFolder($this->getUnJailedPath($trashFolder));
448448
foreach ($content as $item) {
449449
/** @var \OC\Files\Node\Node $item */

0 commit comments

Comments
Β (0)