Skip to content
Snippets Groups Projects
Unverified Commit 42e2068a authored by Morris Jobke's avatar Morris Jobke Committed by GitHub
Browse files

Merge pull request #22744 from nextcloud/shared-cached-permissions

only get the permissions from the share source if it's not already cached
parents 7fd505f8 928cee2a
No related branches found
No related tags found
No related merge requests found
......@@ -146,17 +146,16 @@ class Cache extends CacheJail {
}
try {
$sharePermissions = $this->storage->getPermissions($entry['path']);
if (isset($entry['permissions'])) {
$entry['permissions'] &= $this->storage->getShare()->getPermissions();
} else {
$entry['permissions'] = $this->storage->getPermissions($entry['path']);
}
} catch (StorageNotAvailableException $e) {
// thrown by FailedStorage e.g. when the sharer does not exist anymore
// (IDE may say the exception is never thrown – false negative)
$sharePermissions = 0;
}
if (isset($entry['permissions'])) {
$entry['permissions'] &= $sharePermissions;
} else {
$entry['permissions'] = $sharePermissions;
}
$entry['uid_owner'] = $this->storage->getOwner('');
$entry['displayname_owner'] = $this->getOwnerDisplayName();
if ($path === '') {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment