From f726de3cabfd67b6aa2ab42ad27eb2fd90e84e27 Mon Sep 17 00:00:00 2001 From: Thomas Mueller Date: Fri, 28 Jun 2013 16:49:25 +0200 Subject: [PATCH] for now we disable public upload in case encryption is enabled --- apps/files_sharing/public.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/files_sharing/public.php b/apps/files_sharing/public.php index fa8c25fc98..ef86013b3e 100644 --- a/apps/files_sharing/public.php +++ b/apps/files_sharing/public.php @@ -147,7 +147,11 @@ if (isset($path)) { $tmpl->assign('mimetype', \OC\Files\Filesystem::getMimeType($path)); $tmpl->assign('fileTarget', basename($linkItem['file_target'])); $tmpl->assign('dirToken', $linkItem['token']); - $tmpl->assign('allowPublicUploadEnabled', (($linkItem['permissions'] & OCP\PERMISSION_CREATE) ? true : false )); + $allowPublicUploadEnabled = (($linkItem['permissions'] & OCP\PERMISSION_CREATE) ? true : false ); + if (\OCP\App::isEnabled('files_encryption')) { + $allowPublicUploadEnabled = false; + } + $tmpl->assign('allowPublicUploadEnabled', $allowPublicUploadEnabled); $tmpl->assign('uploadMaxFilesize', $maxUploadFilesize); $tmpl->assign('uploadMaxHumanFilesize', OCP\Util::humanFileSize($maxUploadFilesize));