Integration tests failure
This commit is contained in:
parent
296dc21100
commit
36d87d3f57
@ -191,11 +191,7 @@ module RedmineDmsf
|
||||
prj = nil
|
||||
if Setting.plugin_redmine_dmsf['dmsf_webdav_use_project_names']
|
||||
if name =~ /^\[?.+ (\d+)\]?$/
|
||||
if parent_project
|
||||
prj = scope.find_by(id: $1, parent_id: parent_project.id)
|
||||
else
|
||||
prj = scope.find_by(id: $1)
|
||||
end
|
||||
prj = scope.find_by(id: $1, parent_id: parent_project&.id)
|
||||
if prj
|
||||
# Check again whether it's really the project and not a folder with a number as a suffix
|
||||
prj = nil unless name.start_with?('[' + DmsfFolder::get_valid_title(prj.name))
|
||||
@ -207,11 +203,7 @@ module RedmineDmsf
|
||||
else
|
||||
identifier = name
|
||||
end
|
||||
if parent_project
|
||||
prj = scope.find_by(identifier: identifier, parent_id: parent_project.id)
|
||||
else
|
||||
prj = scope.find_by(identifier: identifier)
|
||||
end
|
||||
prj = scope.find_by(identifier: identifier, parent_id: parent_project&.id)
|
||||
end
|
||||
prj
|
||||
end
|
||||
|
||||
@ -464,8 +464,8 @@ module RedmineDmsf
|
||||
l = entity.lock!(scope, type, Time.current + 1.weeks, args[:owner])
|
||||
@response['Lock-Token'] = l.uuid
|
||||
[1.week.to_i, l.uuid]
|
||||
rescue DmsfLockError
|
||||
e = DAV4Rack::LockFailure.new
|
||||
rescue DmsfLockError => exception
|
||||
e = DAV4Rack::LockFailure.new(exception.message)
|
||||
e.add_failure @path, Conflict
|
||||
raise e
|
||||
end
|
||||
|
||||
@ -62,6 +62,7 @@ module RedmineDmsf
|
||||
@role.add_permission! :view_dmsf_files
|
||||
@role.add_permission! :file_manipulation
|
||||
@role.add_permission! :file_delete
|
||||
Setting.clear_cache
|
||||
Setting.plugin_redmine_dmsf['dmsf_webdav'] = '1'
|
||||
Setting.plugin_redmine_dmsf['dmsf_webdav_strategy'] = 'WEBDAV_READ_WRITE'
|
||||
Setting.plugin_redmine_dmsf['dmsf_webdav_use_project_names'] = nil
|
||||
|
||||
@ -86,9 +86,6 @@ module RedmineDmsf
|
||||
role.add_permission! :manage_workflows
|
||||
role.add_permission! :file_approval
|
||||
end
|
||||
#Setting.plugin_redmine_dmsf['dmsf_webdav'] = '1'
|
||||
#Setting.plugin_redmine_dmsf['dmsf_webdav_strategy'] = 'WEBDAV_READ_WRITE'
|
||||
#Setting.plugin_redmine_dmsf['dmsf_webdav_use_project_names'] = nil
|
||||
Setting.plugin_redmine_dmsf['dmsf_storage_directory'] = File.join(%w(files dmsf))
|
||||
Setting.plugin_redmine_dmsf['dmsf_projects_as_subfolders'] = nil
|
||||
Setting.text_formatting = 'Textile'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user