mirror of
https://github.com/redmine/redmine.git
synced 2025-10-26 07:46:17 +01:00
Patch by Felix Schäfer. git-svn-id: https://svn.redmine.org/redmine/trunk@22038 e93f8b46-1217-0410-a6f0-8f06a7374b81
16 lines
357 B
Ruby
16 lines
357 B
Ruby
class AddSelectProjectPublicityPermission < ActiveRecord::Migration[5.2]
|
|
def up
|
|
Role.find_each do |r|
|
|
r.add_permission!(:select_project_publicity) if r.permissions.include?(:edit_project)
|
|
end
|
|
end
|
|
|
|
def down
|
|
Role.find_each do |r|
|
|
r.remove_permission!(:select_project_publicity)
|
|
end
|
|
end
|
|
|
|
def run_in_request?; true end
|
|
end
|