Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/Folder/FolderManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -463,9 +463,9 @@ private function getCircles(int $id): array {
*
* @throws Exception
*/
public function canManageACL(int $folderId, IUser $user): bool {
public function canManageACL(int $folderId, IUser $user, bool $excludeAdmins = false): bool {
$userId = $user->getUId();
if ($this->groupManager->isAdmin($userId)) {
if (!$excludeAdmins && $this->groupManager->isAdmin($userId)) {
return true;
}

Expand Down
2 changes: 1 addition & 1 deletion lib/Trash/TrashBackend.php
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ private function getTrashForFolders(IUser $user, array $folders): array {
// we apply acl filtering later to get the correct permissions again
$trashFolder = $this->setupTrashFolder($folder);
$content = $trashFolder->getDirectoryListing();
$userCanManageAcl = $this->folderManager->canManageACL($folder->id, $user);
$userCanManageAcl = $this->folderManager->canManageACL($folder->id, $user, true);
$this->aclManagerFactory->getACLManager($user)->preloadRulesForFolder($folder->storageId, $trashFolder->getId());

$itemsForFolder = array_map(function (Node $item) use ($user, $folder, $indexedRows) {
Expand Down
Loading