Also check the access to collections on preparing

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2019-02-22 09:47:36 +01:00 committed by Julius Härtl
parent 43c8d0c9c2
commit eecd9323c5
No known key found for this signature in database
GPG Key ID: 4C614C6ED2CDE6DF
1 changed files with 4 additions and 0 deletions

View File

@ -225,6 +225,10 @@ class CollaborationResourcesController extends OCSController {
}
protected function prepareCollection(ICollection $collection): array {
if (!$collection->canAccess($this->userSession->getUser())) {
return null;
}
return [
'id' => $collection->getId(),
'name' => $collection->getName(),