From fc2d5383119f548f58b5000ebb94422b7feb08a7 Mon Sep 17 00:00:00 2001 From: Thomas Müller Date: Fri, 12 Jul 2013 17:03:51 +0200 Subject: new admin setting added which allows to turn off anonymous uploads --- core/js/share.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'core/js') 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 += '
'; html += ''; html += '
'; - if (itemType === 'folder' && (possiblePermissions & OC.PERMISSION_CREATE)) { + if (itemType === 'folder' && (possiblePermissions & OC.PERMISSION_CREATE) && publicUploadEnabled === 'yes') { html += '