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