fix confusion between stackId and boardId in StackService::update()

Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
This commit is contained in:
Julien Veyssier
2022-01-18 11:21:48 +01:00
committed by backportbot[bot]
parent 6962187497
commit 314fdc43ad

View File

@@ -290,8 +290,8 @@ class StackService {
throw new BadRequestException('order must be a number');
}
$this->permissionService->checkPermission($this->stackMapper, $id, Acl::PERMISSION_MANAGE);
if ($this->boardService->isArchived($this->stackMapper, $id)) {
$this->permissionService->checkPermission($this->stackMapper, $boardId, Acl::PERMISSION_MANAGE);
if ($this->boardService->isArchived($this->stackMapper, $boardId)) {
throw new StatusException('Operation not allowed. This board is archived.');
}
$stack = $this->stackMapper->find($id);