Easy tests
This commit is contained in:
parent
1a63b4c834
commit
9272264cce
@ -86,6 +86,10 @@ Style/ZeroLengthPredicate:
|
||||
Exclude:
|
||||
- lib/redmine_dmsf/webdav/dmsf_resource.rb
|
||||
|
||||
Rails/BulkChangeTable:
|
||||
Exclude:
|
||||
- db/migrate/20170217141601_add_dmsf_not_inheritable_to_custom_fields.rb # Easy tests
|
||||
|
||||
Rails/DangerousColumnNames:
|
||||
Exclude:
|
||||
- db/migrate/20170330131901_create_dmsf_folder_permissions.rb
|
||||
@ -109,6 +113,11 @@ Rails/SkipsModelValidations:
|
||||
- db/migrate/20140519133201_trash_bin.rb
|
||||
- db/migrate/07_dmsf_1_4_4.rb
|
||||
|
||||
Rails/ThreeStateBooleanColumn:
|
||||
Exclude:
|
||||
- db/migrate/04_dmsf_0_9_0.rb # Easy tests
|
||||
- db/migrate/20170217141601_add_dmsf_not_inheritable_to_custom_fields.rb # Easy tests
|
||||
|
||||
Rails/UniqueValidationWithoutIndex:
|
||||
Exclude:
|
||||
- app/models/dmsf_folder.rb # TODO: Create a case insensitive index in DB migrations
|
||||
|
||||
@ -21,7 +21,12 @@
|
||||
# Add column
|
||||
class Dmsf090 < ActiveRecord::Migration[4.2]
|
||||
def up
|
||||
add_column :members, :dmsf_mail_notification, :boolean, null: false, default: false
|
||||
if defined?(EasyExtensions)
|
||||
add_column :members, :dmsf_mail_notification, :boolean, default: false
|
||||
else
|
||||
add_column :members, :dmsf_mail_notification, :boolean,
|
||||
null: false, default: false
|
||||
end
|
||||
drop_table :dmsf_user_prefs
|
||||
end
|
||||
|
||||
|
||||
@ -21,7 +21,11 @@
|
||||
# Add column
|
||||
class AddDmsfNotInheritableToCustomFields < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
add_column :custom_fields, :dmsf_not_inheritable, :boolean,
|
||||
null: false, default: false
|
||||
if defined?(EasyExtensions)
|
||||
add_column :custom_fields, :dmsf_not_inheritable, :boolean, default: false
|
||||
else
|
||||
add_column :custom_fields, :dmsf_not_inheritable, :boolean,
|
||||
null: false, default: false
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@ -36,7 +36,7 @@ module RedmineDmsf
|
||||
description = defined?(EasyExtensions) && EasySetting.value('attachment_description')
|
||||
# Radio buttons
|
||||
if allowed_to_attach_documents(container) && allowed_to_attach_attachments(container)
|
||||
html << description ? '<p>' : '<div>'
|
||||
html << (description ? '<p>' : '<div>')
|
||||
classes = +'inline'
|
||||
html << "<label class=\"#{classes}\">"
|
||||
onchange = %($(".attachments-container:not(.dmsf-uploader)").show();
|
||||
|
||||
@ -34,6 +34,7 @@ module RedmineDmsf
|
||||
def remove_dmsf_references
|
||||
return unless id
|
||||
|
||||
substitute = User.anonymous
|
||||
DmsfFolderPermission.where(object_id: id, object_type: 'Role').update_all object_id: substitute.id
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user