Merge pull request #7280 from opf/feature/board-default
[30171][30170] Add board view by default [ci skip]pull/7282/head
commit
9d2fc57f15
@ -0,0 +1,20 @@ |
||||
class AddBoardViewToRoles < ActiveRecord::Migration[5.2] |
||||
def up |
||||
Role |
||||
.joins(:role_permissions) |
||||
.where("role_permissions.permission = 'view_work_packages'") |
||||
.references(:role_permissions) |
||||
.find_each do |role| |
||||
|
||||
role.add_permission! :show_board_views |
||||
end |
||||
|
||||
unless Setting.default_projects_modules.include?('board_view') |
||||
Setting.default_projects_modules = Setting.default_projects_mdoules + ['board_view'] |
||||
end |
||||
end |
||||
|
||||
def down |
||||
# Nothing to do |
||||
end |
||||
end |
Loading…
Reference in new issue