diff options
author | Joas Schilling <coding@schilljs.com> | 2019-08-21 09:12:01 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2019-08-21 09:16:14 +0200 |
commit | b53283fcb74817a2f840ba9158314875d536e29c (patch) | |
tree | 1366ce6f6d9e484b7871dc00ed27d607e271cb7c /lib/private/Collaboration | |
parent | dd02920aedc63e89c8c8cf2e2c41344954bac08c (diff) | |
download | nextcloud-server-b53283fcb74817a2f840ba9158314875d536e29c.tar.gz nextcloud-server-b53283fcb74817a2f840ba9158314875d536e29c.zip |
Change the logic so projects are only shown when you can access all resources
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/private/Collaboration')
-rw-r--r-- | lib/private/Collaboration/Resources/Manager.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/private/Collaboration/Resources/Manager.php b/lib/private/Collaboration/Resources/Manager.php index d670c3a846d..113a6268289 100644 --- a/lib/private/Collaboration/Resources/Manager.php +++ b/lib/private/Collaboration/Resources/Manager.php @@ -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); |