summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorBjörn Schießle <bjoern@schiessle.org>2013-09-23 01:20:09 -0700
committerBjörn Schießle <bjoern@schiessle.org>2013-09-23 01:20:09 -0700
commit9851f0f4f2a97dc6ac1382bcd533eb23feffa4e0 (patch)
tree9c9af0d9320acdaa51cd3fa79ef443f2cec374bb /core
parent03eedb58fc3529d27238959415b0f2904a0695e6 (diff)
parent71e129f295996a65e2e7d73c5e6a964ba9f8bebf (diff)
downloadnextcloud-server-9851f0f4f2a97dc6ac1382bcd533eb23feffa4e0.tar.gz
nextcloud-server-9851f0f4f2a97dc6ac1382bcd533eb23feffa4e0.zip
Merge pull request #4896 from owncloud/sharing_allow_disable_password
sharing, allow user to disable password protection
Diffstat (limited to 'core')
-rw-r--r--core/js/share.js13
1 files changed, 12 insertions, 1 deletions
diff --git a/core/js/share.js b/core/js/share.js
index 5b93dd30740..f54f13c95e3 100644
--- a/core/js/share.js
+++ b/core/js/share.js
@@ -603,7 +603,18 @@ $(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');
+ var permissions = 0;
+
+ // 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();
}