diff options
author | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2017-11-02 14:55:58 +0100 |
---|---|---|
committer | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2017-11-02 19:37:00 +0100 |
commit | e6b74fac407b62168633be75312074e8ae0e2175 (patch) | |
tree | e573846ca7e0df0e7df6bd1b123f88ef6c0bdd65 /apps/files/js/fileactions.js | |
parent | 555d582f35d1704996c3bf72510a8272cc38f833 (diff) | |
download | nextcloud-server-e6b74fac407b62168633be75312074e8ae0e2175.tar.gz nextcloud-server-e6b74fac407b62168633be75312074e8ae0e2175.zip |
Add proper handling of files without permissions
Now a file gets its directory permissions only if it contained no
permissions (they were undefined or null), but not if its permissions
were set to "NONE".
Besides that, now file actions that do not require any permission on the
file to be performed can be used on files that have no permissions.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'apps/files/js/fileactions.js')
-rw-r--r-- | apps/files/js/fileactions.js | 2 |
1 files changed, 1 insertions, 1 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; } }); |