summaryrefslogtreecommitdiffstats
path: root/core/js/files/client.js
diff options
context:
space:
mode:
authorDaniel Calviño Sánchez <danxuliu@gmail.com>2017-11-02 17:08:00 +0100
committerDaniel Calviño Sánchez <danxuliu@gmail.com>2017-11-02 19:37:01 +0100
commit3e844d3a59cc571c93b6edcd80dce2cffd89072b (patch)
tree3139bfc278b9d36d40a34a1caf6c81b76e4f1d52 /core/js/files/client.js
parentec375b3d8682e8ce062433314c5a3d035b22b3a3 (diff)
downloadnextcloud-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.js5
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':