summaryrefslogtreecommitdiffstats
path: root/core/js
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2013-07-12 17:03:51 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2013-07-12 17:03:51 +0200
commitfc2d5383119f548f58b5000ebb94422b7feb08a7 (patch)
treeace8d4a7b0c08618de4daa1f1580ecaac039f26e /core/js
parent8ae2066b203e5420fa48d6717192db7e96343a2a (diff)
downloadnextcloud-server-fc2d5383119f548f58b5000ebb94422b7feb08a7.tar.gz
nextcloud-server-fc2d5383119f548f58b5000ebb94422b7feb08a7.zip
new admin setting added which allows to turn off anonymous uploads
Diffstat (limited to 'core/js')
-rw-r--r--core/js/share.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/core/js/share.js b/core/js/share.js
index 21e352ee1c6..4c8fd874107 100644
--- a/core/js/share.js
+++ b/core/js/share.js
@@ -161,7 +161,12 @@ OC.Share={
// respective checkbox should be checked or
// not.
+ var publicUploadEnabled = $('#filestable').data('allow-public-upload');
+ if (typeof publicUploadEnabled == 'undefined') {
+ publicUploadEnabled = 'no';
+ }
var allowPublicUploadStatus = false;
+
$.each(data.shares, function(key, value) {
if (allowPublicUploadStatus) {
return true;
@@ -181,7 +186,7 @@ OC.Share={
html += '<div id="linkPass">';
html += '<input id="linkPassText" type="password" placeholder="'+t('core', 'Password')+'" />';
html += '</div>';
- if (itemType === 'folder' && (possiblePermissions & OC.PERMISSION_CREATE)) {
+ if (itemType === 'folder' && (possiblePermissions & OC.PERMISSION_CREATE) && publicUploadEnabled === 'yes') {
html += '<div id="allowPublicUploadWrapper" style="display:none;">';
html += '<input type="checkbox" value="1" name="allowPublicUpload" id="sharingDialogAllowPublicUpload"' + ((allowPublicUploadStatus) ? 'checked="checked"' : '') + ' />';
html += '<label for="sharingDialogAllowPublicUpload">' + t('core', 'Allow Public Upload') + '</label>';