To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.
root / db / migrate / 096_add_commit_access_permission.rb @ 442:753f1380d6bc
History | View | Annotate | Download (321 Bytes)
| 1 |
class AddCommitAccessPermission < ActiveRecord::Migration |
|---|---|
| 2 |
|
| 3 |
def self.up |
| 4 |
Role.find(:all).select { |r| not r.builtin? }.each do |r| |
| 5 |
r.add_permission!(:commit_access)
|
| 6 |
end
|
| 7 |
end
|
| 8 |
|
| 9 |
def self.down |
| 10 |
Role.find(:all).select { |r| not r.builtin? }.each do |r| |
| 11 |
r.remove_permission!(:commit_access)
|
| 12 |
end
|
| 13 |
end
|
| 14 |
end
|