@@ -594,7 +594,7 @@ class CardService {
|
||||
|
||||
$card = $this->cardMapper->find($cardId);
|
||||
$boardId = $this->cardMapper->findBoardId($cardId);
|
||||
$boardUsers = array_keys($this->permissionService->findUsers($boardId));
|
||||
$boardUsers = array_keys($this->permissionService->findUsers($boardId, true));
|
||||
if (!in_array($userId, $boardUsers)) {
|
||||
throw new BadRequestException('The user is not part of the board');
|
||||
}
|
||||
|
||||
@@ -221,9 +221,9 @@ class PermissionService {
|
||||
* @param $boardId
|
||||
* @return array
|
||||
*/
|
||||
public function findUsers($boardId) {
|
||||
public function findUsers($boardId, $refresh = false) {
|
||||
// cache users of a board so we don't query them for every cards
|
||||
if (array_key_exists((string) $boardId, $this->users)) {
|
||||
if (array_key_exists((string) $boardId, $this->users) && !$refresh) {
|
||||
return $this->users[(string) $boardId];
|
||||
}
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user