summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2013-07-05 08:21:45 -0700
committerBart Visscher <bartv@thisnet.nl>2013-07-05 08:21:45 -0700
commitc8d700c7138c3a634305097854b7f31c99702bbb (patch)
tree9b71805b306ca8be3c95667634bfd3fe5cbbe8fe
parentf8dae11a23784bc9ebdef67511934630e46f870b (diff)
parent18b11f76b1e1a4e77ccf5e618f5312538db93532 (diff)
downloadnextcloud-server-c8d700c7138c3a634305097854b7f31c99702bbb.tar.gz
nextcloud-server-c8d700c7138c3a634305097854b7f31c99702bbb.zip
Merge pull request #3948 from owncloud/fixing-3934-master
no anonymous upload on files only folders
-rw-r--r--apps/files_sharing/public.php3
-rw-r--r--core/js/share.js4
2 files changed, 5 insertions, 2 deletions
diff --git a/apps/files_sharing/public.php b/apps/files_sharing/public.php
index fb18bc26248..96fe12fc86a 100644
--- a/apps/files_sharing/public.php
+++ b/apps/files_sharing/public.php
@@ -151,6 +151,9 @@ if (isset($path)) {
if (\OCP\App::isEnabled('files_encryption')) {
$allowPublicUploadEnabled = false;
}
+ if (isset($file)) {
+ $allowPublicUploadEnabled = false;
+ }
$tmpl->assign('allowPublicUploadEnabled', $allowPublicUploadEnabled);
$tmpl->assign('uploadMaxFilesize', $maxUploadFilesize);
$tmpl->assign('uploadMaxHumanFilesize', OCP\Util::humanFileSize($maxUploadFilesize));
diff --git a/core/js/share.js b/core/js/share.js
index 9494637c3dc..21e352ee1c6 100644
--- a/core/js/share.js
+++ b/core/js/share.js
@@ -181,13 +181,13 @@ OC.Share={
html += '<div id="linkPass">';
html += '<input id="linkPassText" type="password" placeholder="'+t('core', 'Password')+'" />';
html += '</div>';
- if (possiblePermissions & OC.PERMISSION_CREATE) {
+ if (itemType === 'folder' && (possiblePermissions & OC.PERMISSION_CREATE)) {
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>';
html += '</div>';
}
- html += '</div><form id="emailPrivateLink" >';
+ html += '</div><form id="emailPrivateLink" >';
html += '<input id="email" style="display:none; width:62%;" value="" placeholder="'+t('core', 'Email link to person')+'" type="text" />';
html += '<input id="emailButton" style="display:none;" type="submit" value="'+t('core', 'Send')+'" />';
html += '</form>';