From 5bcdf6288ae534b60bdd162022c654b1c84fd0f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Pi=C4=8Dman?= Date: Fri, 11 May 2018 08:20:00 +0200 Subject: [PATCH] webdav 1.6.1 bug #854 --- lib/redmine_dmsf/webdav/dmsf_resource.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/redmine_dmsf/webdav/dmsf_resource.rb b/lib/redmine_dmsf/webdav/dmsf_resource.rb index 34607c89..28cb09ac 100644 --- a/lib/redmine_dmsf/webdav/dmsf_resource.rb +++ b/lib/redmine_dmsf/webdav/dmsf_resource.rb @@ -143,9 +143,7 @@ module RedmineDmsf # # If instance is a collection, calls html_display (defined in base_resource.rb) which cycles through children for display # File will only be presented for download if user has permission to view files - ## def get(request, response) - raise NotFound unless exist? raise Forbidden unless (!parent.exist? || !parent.folder || DmsfFolder.permissions?(parent.folder)) if collection? html_display @@ -668,7 +666,7 @@ module RedmineDmsf # also best-utilising DAV4Rack's implementation. def download disk_file = file.last_revision.disk_file - raise NotFound unless (file && file.last_revision && disk_file && File.exist?(disk_file)) + raise NotFound unless file.last_revision && disk_file && File.exist?(disk_file) raise Forbidden unless (!parent.exist? || !parent.folder || DmsfFolder.permissions?(parent.folder)) # If there is no range (start of ranged download, or direct download) then we log the # file access, so we can properly keep logged information