fix: permission check for cloning board
Signed-off-by: Luka Trovic <luka@nextcloud.com>
This commit is contained in:
committed by
backportbot[bot]
parent
95020c4adf
commit
7baaa333ed
@@ -547,6 +547,10 @@ class BoardService {
|
||||
public function clone($id, $userId) {
|
||||
$this->boardServiceValidator->check(compact('id', 'userId'));
|
||||
|
||||
if (!$this->permissionService->canCreate()) {
|
||||
throw new NoPermissionException('Creating boards has been disabled for your account.');
|
||||
}
|
||||
|
||||
$this->permissionService->checkPermission($this->boardMapper, $id, Acl::PERMISSION_READ);
|
||||
|
||||
$board = $this->boardMapper->find($id);
|
||||
|
||||
Reference in New Issue
Block a user