diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2013-07-22 13:08:59 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2013-07-22 13:08:59 +0200 |
commit | 14daec98be5220a2371e7eeca9a31c3d3115f64c (patch) | |
tree | 476593a04707720cd89aa1b43d01734a3fd08182 /core | |
parent | 57d94580e911e31a92bdbbf1196873e5d19eb211 (diff) | |
download | nextcloud-server-14daec98be5220a2371e7eeca9a31c3d3115f64c.tar.gz nextcloud-server-14daec98be5220a2371e7eeca9a31c3d3115f64c.zip |
Squashed commit of the following:
commit 7e875ff47ae1a3e546c74fb12895b2bfbeedabdf
Author: Thomas Müller <thomas.mueller@tmit.eu>
Date: Sun Jul 14 21:58:08 2013 +0200
No admin option to enable public upload in case encryption is enabled
No upload on pubic page if public upload is disabled
commit 4939d9a668c13cdd74e8bb8e305bdd7a59661c4d
Author: Thomas Mueller <thomas.mueller@tmit.eu>
Date: Fri Jul 12 21:34:38 2013 +0200
change anonymous to public
commit c3bda8654d911383ae0acf9e41adda7117cb79f8
Author: Thomas Müller <thomas.mueller@tmit.eu>
Date: Fri Jul 12 17:51:01 2013 +0200
fixing Undefined index: publicUploadEnabled
commit 98861afde443c12a2ef5290c83c63fd12b7b196d
Author: Thomas Müller <thomas.mueller@tmit.eu>
Date: Fri Jul 12 17:05:58 2013 +0200
in case the encryption app is enabled we cannot yet allow anonymous upload
commit 974f09629d0e8bf5d90cf8546fa4a82738ebdebe
Author: Thomas Müller <thomas.mueller@tmit.eu>
Date: Fri Jul 12 17:03:51 2013 +0200
new admin setting added which allows to turn off anonymous uploads
Diffstat (limited to 'core')
-rw-r--r-- | core/js/share.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/core/js/share.js b/core/js/share.js index 3e41edbf558..7ff3205d8b0 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>'; |