Skip to content
Snippets Groups Projects
Commit efa0478d authored by Michael Gapczynski's avatar Michael Gapczynski
Browse files

Remove share permission for encrypted files

parent c07eb4fe
Branches
No related tags found
No related merge requests found
......@@ -56,7 +56,11 @@ class OC_Files {
foreach ($files as &$file) {
$file['directory'] = $directory;
$file['type'] = ($file['mimetype'] == 'httpd/unix-directory') ? 'dir' : 'file';
$permissions = OCP\Share::PERMISSION_READ | OCP\Share::PERMISSION_SHARE;
$permissions = OCP\Share::PERMISSION_READ;
// NOTE: Remove check when new encryption is merged
if (!$file['encrypted']) {
$permissions |= OCP\Share::PERMISSION_SHARE;
}
if ($file['type'] == 'dir' && $file['writable']) {
$permissions |= OCP\Share::PERMISSION_CREATE;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment