WebDAV errors

This commit is contained in:
Karel Pičman 2018-11-09 14:26:47 +01:00
parent f240bbaf9b
commit 802d15818f
2 changed files with 2 additions and 2 deletions

View File

@ -60,7 +60,7 @@ module RedmineDmsf
# plain HTTP is going on.
if (env['REQUEST_METHOD'].present? && ('OPTIONS'.casecmp(env['REQUEST_METHOD']) == 0)) &&
(env['PATH_INFO'].present? && env['PATH_INFO'].start_with?('/dmsf')) # *
[ '200', { :Allow => 'OPTIONS,HEAD,GET,PUT,POST,DELETE' }, [''] ]
[ '200', { 'Allow' => 'OPTIONS,HEAD,GET,PUT,POST,DELETE' }, [''] ]
# * This's a new condition in order to not process WebDAV request which doesn't belong to DMS. But, it might
# case problems when acessing /dmsf and consequently /
else

View File

@ -239,7 +239,7 @@ module RedmineDmsf
end
# At the moment we don't support cross project destinations
return MethodNotImplemented unless (project.id == resource.project.id)
return NotImplemented unless (project.id == resource.project.id)
raise Forbidden unless User.current.admin? || User.current.allowed_to?(:folder_manipulation, project)
raise Forbidden unless DmsfFolder.permissions?(folder, false)