summaryrefslogtreecommitdiffstats
path: root/core/js/share.js
diff options
context:
space:
mode:
Diffstat (limited to 'core/js/share.js')
-rw-r--r--core/js/share.js12
1 files changed, 11 insertions, 1 deletions
diff --git a/core/js/share.js b/core/js/share.js
index 5d34faf8a5d..f0fc4136e61 100644
--- a/core/js/share.js
+++ b/core/js/share.js
@@ -603,7 +603,17 @@ $(document).ready(function() {
if (!$('#showPassword').is(':checked') ) {
var itemType = $('#dropdown').data('item-type');
var itemSource = $('#dropdown').data('item-source');
- OC.Share.share(itemType, itemSource, OC.Share.SHARE_TYPE_LINK, '', OC.PERMISSION_READ);
+ var allowPublicUpload = $('#sharingDialogAllowPublicUpload').is(':checked');
+
+ // Calculate permissions
+ if (allowPublicUpload) {
+ permissions = OC.PERMISSION_UPDATE + OC.PERMISSION_CREATE + OC.PERMISSION_READ;
+ } else {
+ permissions = OC.PERMISSION_READ;
+ }
+
+
+ OC.Share.share(itemType, itemSource, OC.Share.SHARE_TYPE_LINK, '', permissions);
} else {
$('#linkPassText').focus();
}