diff options
author | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2017-11-02 17:08:00 +0100 |
---|---|---|
committer | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2017-11-02 19:37:01 +0100 |
commit | 3e844d3a59cc571c93b6edcd80dce2cffd89072b (patch) | |
tree | 3139bfc278b9d36d40a34a1caf6c81b76e4f1d52 /core/js/files/client.js | |
parent | ec375b3d8682e8ce062433314c5a3d035b22b3a3 (diff) | |
download | nextcloud-server-3e844d3a59cc571c93b6edcd80dce2cffd89072b.tar.gz nextcloud-server-3e844d3a59cc571c93b6edcd80dce2cffd89072b.zip |
Set read permission for files based on the data returned by the server
Now that the permissions returned by the server specify whether a file
is readable or not the frontend no longer needs to assume that every
file is readable.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'core/js/files/client.js')
-rw-r--r-- | core/js/files/client.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/core/js/files/client.js b/core/js/files/client.js index dc9f6ade641..14d18ecf80c 100644 --- a/core/js/files/client.js +++ b/core/js/files/client.js @@ -319,7 +319,7 @@ } } - data.permissions = OC.PERMISSION_READ; + data.permissions = OC.PERMISSION_NONE; var permissionProp = props[Client.PROPERTY_PERMISSIONS]; if (!_.isUndefined(permissionProp)) { var permString = permissionProp || ''; @@ -332,6 +332,9 @@ case 'K': data.permissions |= OC.PERMISSION_CREATE; break; + case 'G': + data.permissions |= OC.PERMISSION_READ; + break; case 'W': case 'N': case 'V': |