@@ -393,6 +393,8 @@ class StackService {
|
||||
}
|
||||
|
||||
$this->permissionService->checkPermission(null, $boardId, Acl::PERMISSION_MANAGE);
|
||||
$this->permissionService->checkPermission(null, $boardId, Acl::PERMISSION_READ);
|
||||
|
||||
if ($this->boardService->isArchived(null, $boardId)) {
|
||||
throw new StatusException('Operation not allowed. This board is archived.');
|
||||
}
|
||||
@@ -400,6 +402,10 @@ class StackService {
|
||||
$stack = $this->stackMapper->find($id);
|
||||
$board = $this->boardMapper->find($boardId);
|
||||
|
||||
if ($stack->getBoardId() !== $board->getId()) {
|
||||
throw new StatusException('Operation not allowed. Stack is not part of this board');
|
||||
}
|
||||
|
||||
|
||||
$newStack = new Stack();
|
||||
$newStack->setTitle($stack->getTitle() . ' (' . $this->l10n->t('copy') . ')');
|
||||
@@ -418,7 +424,6 @@ class StackService {
|
||||
);
|
||||
|
||||
$cards = $this->cardMapper->findAll($id);
|
||||
$newCardArray = [];
|
||||
foreach ($cards as $card) {
|
||||
|
||||
$newCard = new Card();
|
||||
|
||||
Reference in New Issue
Block a user