committed by
Julius Härtl
parent
3c2ee00ad7
commit
ac1b1e826f
@@ -35,7 +35,7 @@ class CardMapper extends DeckMapper implements IPermissionMapper {
|
|||||||
private $labelMapper;
|
private $labelMapper;
|
||||||
/** @var IUserManager */
|
/** @var IUserManager */
|
||||||
private $userManager;
|
private $userManager;
|
||||||
/** @var Manager */
|
/** @var IManager */
|
||||||
private $notificationManager;
|
private $notificationManager;
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
|
|||||||
@@ -184,14 +184,18 @@ class PermissionService {
|
|||||||
* Required to allow assigning them to cards
|
* Required to allow assigning them to cards
|
||||||
*
|
*
|
||||||
* @param $boardId
|
* @param $boardId
|
||||||
* @return array|null
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function findUsers($boardId) {
|
public function findUsers($boardId) {
|
||||||
// cache users of a board so we don't query them for every cards
|
// 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)) {
|
||||||
return $this->users[(string)$boardId];
|
return $this->users[(string)$boardId];
|
||||||
}
|
}
|
||||||
|
try {
|
||||||
$board = $this->boardMapper->find($boardId);
|
$board = $this->boardMapper->find($boardId);
|
||||||
|
} catch (DoesNotExistException $e) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
$users = [
|
$users = [
|
||||||
new User($this->userManager->get($board->getOwner()))
|
new User($this->userManager->get($board->getOwner()))
|
||||||
];
|
];
|
||||||
|
|||||||
Reference in New Issue
Block a user