To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.

Statistics Download as Zip
| Branch: | Tag: | Revision:

root / db / migrate / 096_add_commit_access_permission.rb @ 443:350acce374a2

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