Change the logic so projects are only shown when you can access all resources
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
c8d2c5ed33
commit
62a637fd42
|
@ -353,12 +353,15 @@ class Manager implements IManager {
|
|||
return $access;
|
||||
}
|
||||
|
||||
$access = false;
|
||||
$access = null;
|
||||
// Access is granted when a user can access all resources
|
||||
foreach ($collection->getResources() as $resource) {
|
||||
if ($resource->canAccess($user)) {
|
||||
$access = true;
|
||||
if (!$resource->canAccess($user)) {
|
||||
$access = false;
|
||||
break;
|
||||
}
|
||||
|
||||
$access = true;
|
||||
}
|
||||
|
||||
$this->cacheAccessForCollection($collection, $user, $access);
|
||||
|
|
Loading…
Reference in New Issue