Merge pull request #22892 from nextcloud/backport/22744/stable19
[stable19] only get the permissions from the share source if it's not already cached
This commit is contained in:
commit
eff6e53125
|
@ -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 === '') {
|
||||
|
|
Loading…
Reference in New Issue