diff options
author | Vincent Petry <pvince81@owncloud.com> | 2014-09-05 12:20:48 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2014-09-05 12:20:48 +0200 |
commit | 5913a694de0e98e918d9d08340ac88c9f1eab937 (patch) | |
tree | 8b34600e2e271c3ab2fd44989977ab82dcaf8566 /apps/files/js/files.js | |
parent | 614cf996ca74d26263f3ffeb43e7a9b81eadfae6 (diff) | |
parent | f1bfe35cda2f11d1b38726cf2d4f879427b2c8d5 (diff) | |
download | nextcloud-server-5913a694de0e98e918d9d08340ac88c9f1eab937.tar.gz nextcloud-server-5913a694de0e98e918d9d08340ac88c9f1eab937.zip |
Merge pull request #10870 from owncloud/dnd-droponreadonlyfolderfix
Added permission check for drag and drop
Diffstat (limited to 'apps/files/js/files.js')
-rw-r--r-- | apps/files/js/files.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/apps/files/js/files.js b/apps/files/js/files.js index df0c40a4405..5fcf99d24af 100644 --- a/apps/files/js/files.js +++ b/apps/files/js/files.js @@ -433,7 +433,12 @@ var folderDropOptions = { return false; } - var targetPath = FileList.getCurrentDirectory() + '/' + $(this).closest('tr').data('file'); + var $tr = $(this).closest('tr'); + if (($tr.data('permissions') & OC.PERMISSION_CREATE) === 0) { + FileList._showPermissionDeniedNotification(); + return false; + } + var targetPath = FileList.getCurrentDirectory() + '/' + $tr.data('file'); var files = FileList.getSelectedFiles(); if (files.length === 0) { |