diff options
author | Vincent Petry <pvince81@owncloud.com> | 2015-07-13 17:41:20 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2015-11-22 16:05:50 +0100 |
commit | f20232d4bd3e78c4ea980aa03849c3f9bcf5b893 (patch) | |
tree | c23d4511baaf4df2d1c397326334d40f8455243a /apps/files | |
parent | fa2be0750c50de45a2fd101eb23fa858c0e0771b (diff) | |
download | nextcloud-server-f20232d4bd3e78c4ea980aa03849c3f9bcf5b893.tar.gz nextcloud-server-f20232d4bd3e78c4ea980aa03849c3f9bcf5b893.zip |
Make public link share page work with Webdav and add operations
The public page now uses the public.php/webdav endpoint.
Also enabled more file operations like rename, move, delete and create
folder from the public page, which are now all possible thanks to the
public.php/webdav endpoint.
Diffstat (limited to 'apps/files')
-rw-r--r-- | apps/files/ajax/upload.php | 7 | ||||
-rw-r--r-- | apps/files/js/files.js | 2 | ||||
-rw-r--r-- | apps/files/templates/list.php | 11 |
3 files changed, 3 insertions, 17 deletions
diff --git a/apps/files/ajax/upload.php b/apps/files/ajax/upload.php index a784642728f..18e9cfe6117 100644 --- a/apps/files/ajax/upload.php +++ b/apps/files/ajax/upload.php @@ -41,7 +41,6 @@ OCP\JSON::setContentTypeHeader('text/plain'); // If not, check the login. // If no token is sent along, rely on login only -$allowedPermissions = \OCP\Constants::PERMISSION_ALL; $errorCode = null; $l = \OC::$server->getL10N('files'); @@ -60,8 +59,6 @@ if (empty($_POST['dirToken'])) { \OC_User::setIncognitoMode(true); - // return only read permissions for public upload - $allowedPermissions = \OCP\Constants::PERMISSION_READ; $publicDirectory = !empty($_POST['subdir']) ? (string)$_POST['subdir'] : '/'; $linkItem = OCP\Share::getShareByToken((string)$_POST['dirToken']); @@ -207,7 +204,7 @@ if (\OC\Files\Filesystem::isValidPath($dir) === true) { $data['originalname'] = $files['name'][$i]; $data['uploadMaxFilesize'] = $maxUploadFileSize; $data['maxHumanFilesize'] = $maxHumanFileSize; - $data['permissions'] = $meta['permissions'] & $allowedPermissions; + $data['permissions'] = $meta['permissions']; $data['directory'] = $returnedDir; $result[] = $data; } @@ -234,7 +231,7 @@ if (\OC\Files\Filesystem::isValidPath($dir) === true) { $data['originalname'] = $files['name'][$i]; $data['uploadMaxFilesize'] = $maxUploadFileSize; $data['maxHumanFilesize'] = $maxHumanFileSize; - $data['permissions'] = $meta['permissions'] & $allowedPermissions; + $data['permissions'] = $meta['permissions']; $data['directory'] = $returnedDir; $result[] = $data; } diff --git a/apps/files/js/files.js b/apps/files/js/files.js index 6bdd14ac65d..e33b8354437 100644 --- a/apps/files/js/files.js +++ b/apps/files/js/files.js @@ -207,7 +207,7 @@ */ lazyLoadPreview : function(path, mime, ready, width, height, etag) { console.warn('DEPRECATED: please use lazyLoadPreview() from an OCA.Files.FileList instance'); - return OCA.Files.App.fileList.lazyLoadPreview({ + return FileList.lazyLoadPreview({ path: path, mime: mime, callback: ready, diff --git a/apps/files/templates/list.php b/apps/files/templates/list.php index 7ebf80ee8b2..04550f945b6 100644 --- a/apps/files/templates/list.php +++ b/apps/files/templates/list.php @@ -1,16 +1,5 @@ <div id="controls"> <div class="actions creatable hidden"> - <?php /* - Only show upload button for public page - */ ?> - <?php if(isset($_['dirToken'])):?> - <div id="upload" class="button upload" - title="<?php isset($_['uploadMaxHumanFilesize']) ? p($l->t('Upload (max. %s)', array($_['uploadMaxHumanFilesize']))) : '' ?>"> - <label for="file_upload_start" class="svg icon-upload"> - <span class="hidden-visually"><?php p($l->t('Upload'))?></span> - </label> - </div> - <?php endif; ?> <div id="uploadprogresswrapper"> <div id="uploadprogressbar"></div> <button class="stop icon-close" style="display:none"> |