diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2013-07-22 04:04:59 -0700 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2013-07-22 04:04:59 -0700 |
commit | f9f013bba7aa87460b4d7a65fb1139cc42afae4b (patch) | |
tree | f8d8961af7b96b013289d7a0c1018ee40a996aea /apps | |
parent | 342a54bf7b31fe21362bac59cfa80a5d30ce9362 (diff) | |
parent | 840e96cda39b97dc0c42b52946f0e98c62df3bf4 (diff) | |
download | nextcloud-server-f9f013bba7aa87460b4d7a65fb1139cc42afae4b.tar.gz nextcloud-server-f9f013bba7aa87460b4d7a65fb1139cc42afae4b.zip |
Merge pull request #4045 from owncloud/disable-anon-upload-master
Disable anon upload master
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files/index.php | 5 | ||||
-rw-r--r-- | apps/files/templates/index.php | 2 | ||||
-rw-r--r-- | apps/files_sharing/public.php | 4 |
3 files changed, 10 insertions, 1 deletions
diff --git a/apps/files/index.php b/apps/files/index.php index 2338cf439e4..2f005391509 100644 --- a/apps/files/index.php +++ b/apps/files/index.php @@ -121,6 +121,10 @@ if ($needUpgrade) { // information about storage capacities $storageInfo=OC_Helper::getStorageInfo(); $maxUploadFilesize=OCP\Util::maxUploadFilesize($dir); + $publicUploadEnabled = \OC_Appconfig::getValue('core', 'shareapi_allow_public_upload', 'yes'); + if (OC_App::isEnabled('files_encryption')) { + $publicUploadEnabled = 'no'; + } OCP\Util::addscript('files', 'fileactions'); OCP\Util::addscript('files', 'files'); @@ -138,5 +142,6 @@ if ($needUpgrade) { $tmpl->assign('allowZipDownload', intval(OCP\Config::getSystemValue('allowZipDownload', true))); $tmpl->assign('usedSpacePercent', (int)$storageInfo['relative']); $tmpl->assign('isPublic', false); + $tmpl->assign('publicUploadEnabled', $publicUploadEnabled); $tmpl->printPage(); } diff --git a/apps/files/templates/index.php b/apps/files/templates/index.php index fa4cda6f6b2..e0731609368 100644 --- a/apps/files/templates/index.php +++ b/apps/files/templates/index.php @@ -61,7 +61,7 @@ <div id="emptyfolder"><?php p($l->t('Nothing in here. Upload something!'))?></div> <?php endif; ?> -<table id="filestable"> +<table id="filestable" data-allow-public-upload="<?php p($_['publicUploadEnabled'])?>"> <thead> <tr> <th id='headerName'> diff --git a/apps/files_sharing/public.php b/apps/files_sharing/public.php index 9462844a82b..3f8e29345a7 100644 --- a/apps/files_sharing/public.php +++ b/apps/files_sharing/public.php @@ -137,6 +137,9 @@ if (isset($path)) { if (\OCP\App::isEnabled('files_encryption')) { $allowPublicUploadEnabled = false; } + if (OC_Appconfig::getValue('core', 'shareapi_allow_public_upload', 'yes') === 'no') { + $allowPublicUploadEnabled = false; + } if ($linkItem['item_type'] !== 'folder') { $allowPublicUploadEnabled = false; } @@ -202,6 +205,7 @@ if (isset($path)) { $folder->assign('isCreatable', false); $folder->assign('permissions', OCP\PERMISSION_READ); $folder->assign('isPublic',true); + $folder->assign('publicUploadEnabled', 'no'); $folder->assign('files', $files); $folder->assign('uploadMaxFilesize', $maxUploadFilesize); $folder->assign('uploadMaxHumanFilesize', OCP\Util::humanFileSize($maxUploadFilesize)); |