Rubocop
This commit is contained in:
parent
1219518268
commit
5262fdcf10
@ -145,7 +145,7 @@ class DmsfFile < ApplicationRecord
|
||||
|
||||
def delete(commit: false)
|
||||
if locked_for_user? && !User.current.allowed_to?(:force_file_unlock, project)
|
||||
Rails.logger.info { l(:error_file_is_locked) }
|
||||
Rails.logger.info l(:error_file_is_locked)
|
||||
if lock.reverse[0].user
|
||||
errors.add(:base, l(:title_locked_by_user, user: lock.reverse[0].user))
|
||||
else
|
||||
|
||||
@ -38,9 +38,7 @@ module RedmineDmsf
|
||||
rescue StandardError
|
||||
@office_available = false
|
||||
end
|
||||
unless @office_available
|
||||
Rails.logger.warn { l(:note_dmsf_office_bin_not_available, value: OFFICE_BIN, locale: :en) }
|
||||
end
|
||||
Rails.logger.warn l(:note_dmsf_office_bin_not_available, value: OFFICE_BIN, locale: :en) unless @office_available
|
||||
@office_available
|
||||
end
|
||||
|
||||
|
||||
@ -548,7 +548,7 @@ module RedmineDmsf
|
||||
pattern = Setting.plugin_redmine_dmsf['dmsf_webdav_ignore']
|
||||
pattern = /^(\._|\.DS_Store$|Thumbs.db$)/ if pattern.blank?
|
||||
if basename.match(pattern)
|
||||
Rails.logger.info { "#{basename} ignored" }
|
||||
Rails.logger.info "#{basename} ignored"
|
||||
return NoContent
|
||||
end
|
||||
reuse_revision = false
|
||||
@ -557,7 +557,7 @@ module RedmineDmsf
|
||||
# Disable versioning for file name patterns given in the plugin settings.
|
||||
pattern = Setting.plugin_redmine_dmsf['dmsf_webdav_disable_versioning']
|
||||
if pattern.present? && basename.match(pattern)
|
||||
Rails.logger.info { "Versioning disabled for #{basename}" }
|
||||
Rails.logger.info "Versioning disabled for #{basename}"
|
||||
reuse_revision = true
|
||||
end
|
||||
reuse_revision = true if reuse_version_for_locked_file(file)
|
||||
@ -617,7 +617,7 @@ module RedmineDmsf
|
||||
# Ignore 1b files sent for authentication
|
||||
if Setting.plugin_redmine_dmsf['dmsf_webdav_ignore_1b_file_for_authentication'].present? &&
|
||||
new_revision.size == 1
|
||||
Rails.logger.warn { "1b file '#{basename}' sent for authentication ignored" }
|
||||
Rails.logger.warn "1b file '#{basename}' sent for authentication ignored"
|
||||
return NoContent
|
||||
end
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user