2008-09-13 20:31:11 +04:00
|
|
|
class AddCommitAccessPermission < ActiveRecord::Migration
|
|
|
|
def self.up
|
2012-12-03 00:28:37 +04:00
|
|
|
Role.all.select { |r| not r.builtin? }.each do |r|
|
2011-11-09 12:11:36 +04:00
|
|
|
r.add_permission!(:commit_access)
|
|
|
|
end
|
2008-09-13 20:31:11 +04:00
|
|
|
end
|
|
|
|
|
|
|
|
def self.down
|
2012-12-03 00:28:37 +04:00
|
|
|
Role.all.select { |r| not r.builtin? }.each do |r|
|
2011-11-09 12:11:36 +04:00
|
|
|
r.remove_permission!(:commit_access)
|
|
|
|
end
|
2008-09-13 20:31:11 +04:00
|
|
|
end
|
|
|
|
end
|