Mercurial > hg > soundsoftware-site
comparison .svn/pristine/f8/f890810254315df22a74b5e02dde109dedd9847a.svn-base @ 1298:4f746d8966dd redmine_2.3_integration
Merge from redmine-2.3 branch to create new branch redmine-2.3-integration
author | Chris Cannam |
---|---|
date | Fri, 14 Jun 2013 09:28:30 +0100 |
parents | 622f24f53b42 |
children |
comparison
equal
deleted
inserted
replaced
1297:0a574315af3e | 1298:4f746d8966dd |
---|---|
1 class AddRepositoriesPermissions < ActiveRecord::Migration | |
2 # model removed | |
3 class Permission < ActiveRecord::Base; end | |
4 | |
5 def self.up | |
6 Permission.create :controller => "repositories", :action => "show", :description => "button_view", :sort => 1450, :is_public => true | |
7 Permission.create :controller => "repositories", :action => "browse", :description => "label_browse", :sort => 1460, :is_public => true | |
8 Permission.create :controller => "repositories", :action => "entry", :description => "entry", :sort => 1462, :is_public => true | |
9 Permission.create :controller => "repositories", :action => "revisions", :description => "label_view_revisions", :sort => 1470, :is_public => true | |
10 Permission.create :controller => "repositories", :action => "revision", :description => "label_view_revisions", :sort => 1472, :is_public => true | |
11 Permission.create :controller => "repositories", :action => "diff", :description => "diff", :sort => 1480, :is_public => true | |
12 end | |
13 | |
14 def self.down | |
15 Permission.where("controller=? and action=?", 'repositories', 'show').first.destroy | |
16 Permission.where("controller=? and action=?", 'repositories', 'browse').first.destroy | |
17 Permission.where("controller=? and action=?", 'repositories', 'entry').first.destroy | |
18 Permission.where("controller=? and action=?", 'repositories', 'revisions').first.destroy | |
19 Permission.where("controller=? and action=?", 'repositories', 'revision').first.destroy | |
20 Permission.where("controller=? and action=?", 'repositories', 'diff').first.destroy | |
21 end | |
22 end |