summaryrefslogtreecommitdiffstats
path: root/apps/files/js
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files/js')
-rw-r--r--apps/files/js/fileactions.js2
-rw-r--r--apps/files/js/filelist.js7
2 files changed, 7 insertions, 2 deletions
diff --git a/apps/files/js/fileactions.js b/apps/files/js/fileactions.js
index 0f320c8b3c7..6c031ab06d5 100644
--- a/apps/files/js/fileactions.js
+++ b/apps/files/js/fileactions.js
@@ -235,7 +235,7 @@
}
var filteredActions = {};
$.each(actions, function (name, action) {
- if (action.permissions & permissions) {
+ if ((action.permissions === OC.PERMISSION_NONE) || (action.permissions & permissions)) {
filteredActions[name] = action;
}
});
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js
index 4790afcf4d0..c19f517e422 100644
--- a/apps/files/js/filelist.js
+++ b/apps/files/js/filelist.js
@@ -1159,6 +1159,11 @@
}
}
+ var permissions = fileData.permissions;
+ if (permissions === undefined || permissions === null) {
+ permissions = this.getDirectoryPermissions();
+ }
+
//containing tr
var tr = $('<tr></tr>').attr({
"data-id" : fileData.id,
@@ -1168,7 +1173,7 @@
"data-mime": mime,
"data-mtime": mtime,
"data-etag": fileData.etag,
- "data-permissions": fileData.permissions || this.getDirectoryPermissions(),
+ "data-permissions": permissions,
"data-has-preview": fileData.hasPreview !== false
});