Merge pull request #40996 from nextcloud/view-share-disable-reuse

reuse sharing disabled state when listing folder content
pull/41266/head
Robin Appelman 2023-11-08 15:52:35 +07:00 committed by GitHub
commit 79088ea15f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

@ -1525,7 +1525,7 @@ class View {
$rootEntry['path'] = substr(Filesystem::normalizePath($path . '/' . $rootEntry['name']), strlen($user) + 2); // full path without /$user/
// if sharing was disabled for the user we remove the share permissions
if (\OCP\Util::isSharingDisabledForUser()) {
if ($sharingDisabled) {
$rootEntry['permissions'] = $rootEntry['permissions'] & ~\OCP\Constants::PERMISSION_SHARE;
}