remove share permissions if user is excluded from sharing
This commit is contained in:
parent
008498dcad
commit
6dda30b5a2
1 changed files with 10 additions and 0 deletions
|
@ -960,6 +960,10 @@ class View {
|
|||
$content['permissions'] = $storage->getPermissions($content['path']);
|
||||
$cache->update($content['fileid'], array('permissions' => $content['permissions']));
|
||||
}
|
||||
// if sharing was disabled for the user we remove the share permissions
|
||||
if (\OCP\Util::isSharingDisabledForUser()) {
|
||||
$content['permissions'] = $content['permissions'] & ~\OCP\PERMISSION_SHARE;
|
||||
}
|
||||
$files[] = new FileInfo($path . '/' . $content['name'], $storage, $content['path'], $content);
|
||||
}
|
||||
|
||||
|
@ -1008,6 +1012,12 @@ class View {
|
|||
}
|
||||
}
|
||||
$rootEntry['path'] = substr($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()) {
|
||||
$content['permissions'] = $content['permissions'] & ~\OCP\PERMISSION_SHARE;
|
||||
}
|
||||
|
||||
$files[] = new FileInfo($path . '/' . $rootEntry['name'], $subStorage, '', $rootEntry);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue