From: Thomas Müller Date: Sun, 14 Jul 2013 19:58:08 +0000 (+0200) Subject: No admin option to enable public upload in case encryption is enabled X-Git-Tag: v6.0.0alpha2~424^2~3 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=79d23463f82d70fc7b3aff176d0de8154720f480;p=nextcloud-server.git No admin option to enable public upload in case encryption is enabled No upload on pubic page if public upload is disabled --- diff --git a/apps/files_sharing/public.php b/apps/files_sharing/public.php index 695c00e5541..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,7 +205,7 @@ if (isset($path)) { $folder->assign('isCreatable', false); $folder->assign('permissions', OCP\PERMISSION_READ); $folder->assign('isPublic',true); - $folder->assign('publicUploadEnabled', true); + $folder->assign('publicUploadEnabled', 'no'); $folder->assign('files', $files); $folder->assign('uploadMaxFilesize', $maxUploadFilesize); $folder->assign('uploadMaxHumanFilesize', OCP\Util::humanFileSize($maxUploadFilesize)); diff --git a/settings/templates/admin.php b/settings/templates/admin.php index 9f16db0948d..6c4fddd375d 100644 --- a/settings/templates/admin.php +++ b/settings/templates/admin.php @@ -145,6 +145,7 @@ if (!$_['internetconnectionworking']) { t('Allow users to share items to the public with links')); ?> + > t('Allow users to enable others to anonymously upload into their publicly shared folders')); ?> + >