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