summaryrefslogtreecommitdiffstats
path: root/apps/files_versions/lib
diff options
context:
space:
mode:
authorBjoern Schiessle <bjoern@schiessle.org>2016-07-01 18:48:48 +0200
committerBjoern Schiessle <bjoern@schiessle.org>2016-07-04 10:48:15 +0200
commit4a4cac611f7d7a188cb80364d9e7b5c49e5346bf (patch)
tree37876df151eb30cf5a48f5c9a332151f891e9158 /apps/files_versions/lib
parent5b4cea4b366e9420a70cad4b817c1594da2ad0fe (diff)
downloadnextcloud-server-4a4cac611f7d7a188cb80364d9e7b5c49e5346bf.tar.gz
nextcloud-server-4a4cac611f7d7a188cb80364d9e7b5c49e5346bf.zip
we don't need to check permissions twice
Diffstat (limited to 'apps/files_versions/lib')
-rw-r--r--apps/files_versions/lib/Storage.php6
1 files changed, 2 insertions, 4 deletions
diff --git a/apps/files_versions/lib/Storage.php b/apps/files_versions/lib/Storage.php
index 9a0fe0a7b37..f0cd9d65310 100644
--- a/apps/files_versions/lib/Storage.php
+++ b/apps/files_versions/lib/Storage.php
@@ -313,6 +313,7 @@ class Storage {
*
* @param string $file file name
* @param int $revision revision timestamp
+ * @return bool
*/
public static function rollback($file, $revision) {
@@ -323,13 +324,10 @@ class Storage {
if ($uid === null || trim($filename, '/') === '') {
return false;
}
+
$users_view = new View('/'.$uid);
$files_view = new View('/'. User::getUser().'/files');
- if (!$files_view->isUpdatable($filename)) {
- return false;
- }
-
$versionCreated = false;
$fileInfo = $files_view->getFileInfo($file);