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:
Joas Schilling 2019-08-21 09:12:01 +02:00
parent dd02920aed
commit b53283fcb7
No known key found for this signature in database
GPG Key ID: 7076EA9751AACDDA
1 changed files with 6 additions and 3 deletions

View File

@ -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);