summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2016-12-06 15:41:10 +0100
committerArthur Schiwon <blizzz@arthur-schiwon.de>2016-12-06 15:41:10 +0100
commitc2062a93a3eb57c01609a89775c8551b92cc9013 (patch)
treee0a6a1cb8630444c2397f994a441457ac7ee8419 /core
parent02f26751ceecdedb1df9213834c6be339ecb88bd (diff)
downloadnextcloud-server-c2062a93a3eb57c01609a89775c8551b92cc9013.tar.gz
nextcloud-server-c2062a93a3eb57c01609a89775c8551b92cc9013.zip
set different permissions if file or folder
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'core')
-rw-r--r--core/js/sharedialogshareelistview.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/core/js/sharedialogshareelistview.js b/core/js/sharedialogshareelistview.js
index 4c197a6a253..a0a7bbfa2dc 100644
--- a/core/js/sharedialogshareelistview.js
+++ b/core/js/sharedialogshareelistview.js
@@ -367,14 +367,18 @@
checked = $element.is(':checked');
// Check/uncheck Create, Update, and Delete checkboxes if Edit is checked/unck
$($checkboxes).prop('checked', checked);
+ if (checked) {
+ permissions |= OC.PERMISSION_CREATE | OC.PERMISSION_UPDATE | OC.PERMISSION_DELETE;
+ }
} else {
var numberChecked = $checkboxes.filter(':checked').length;
checked = numberChecked > 0;
$('input[name="edit"]', $li).prop('checked', checked);
}
- }
- if ($element.attr('name') === 'edit' && $element.is(':checked')) {
- permissions |= OC.PERMISSION_CREATE | OC.PERMISSION_UPDATE | OC.PERMISSION_READ | OC.PERMISSION_DELETE;
+ } else {
+ if ($element.attr('name') === 'edit' && $element.is(':checked')) {
+ permissions |= OC.PERMISSION_UPDATE;
+ }
}
$('.permissions', $li).not('input[name="edit"]').filter(':checked').each(function(index, checkbox) {