WebDAV errors
This commit is contained in:
parent
f240bbaf9b
commit
802d15818f
@ -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
|
||||
|
||||
@ -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)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user