OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openproject/db/migrate/20190527095959_set_manage_b...

17 lines
350 B

class SetManageBoardPermission < ActiveRecord::Migration[5.2]
def up
Role
.joins(:role_permissions)
.where("role_permissions.permission = 'manage_public_queries'")
.references(:role_permissions)
.find_each do |role|
role.add_permission! :manage_board_views
end
end
def down
# Nothing to do
end
end