fix: Consider a deleted board inaccessible to share recipients
Only the owner can delete/undo a board deletion so there is no reason other users should have any permission on a board marked as deleted Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
@@ -107,8 +107,9 @@ class PermissionService {
|
||||
return $cached;
|
||||
}
|
||||
|
||||
$board = $this->getBoard($boardId);
|
||||
$owner = $this->userIsBoardOwner($boardId, $userId);
|
||||
$acls = $this->aclMapper->findAll($boardId);
|
||||
$acls = $board->getDeletedAt() === 0 ? $this->aclMapper->findAll($boardId) : [];
|
||||
$permissions = [
|
||||
Acl::PERMISSION_READ => $owner || $this->userCan($acls, Acl::PERMISSION_READ, $userId),
|
||||
Acl::PERMISSION_EDIT => $owner || $this->userCan($acls, Acl::PERMISSION_EDIT, $userId),
|
||||
|
||||
Reference in New Issue
Block a user