[ * 'GRANT', * 'READ', * 'WRITE' * ], * 'http://www.tao.lu/Ontologies/TAO.rdf#ItemAuthor' => [ * 'GRANT', * 'READ' * ], * ] */ public function retrieveByResourceIds(array $resourceIds): array { $results = $this->getDataBaseAccess() ->getUsersWithPermissions($resourceIds); $permissions = []; foreach ($results as $result) { $user = $result['user_id']; if (!isset($permissions[$user])) { $permissions[$user] = []; } $permissions[$user][] = $result['privilege']; } return $permissions; } private function getDataBaseAccess(): DataBaseAccess { return $this->getServiceLocator()->get(DataBaseAccess::SERVICE_ID); } }