summaryrefslogtreecommitdiffstats
path: root/db
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2009-11-14 12:08:47 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2009-11-14 12:08:47 +0000
commitdfd02040521b84c64e9aa5d7b70ccfa427ffe841 (patch)
treea10651d01952dbcd83ede78d7a2d4f5a7a0028cd /db
parent326ed79b432a3c0172cfbe0eaf801645e7b2e2c6 (diff)
downloadredmine-dfd02040521b84c64e9aa5d7b70ccfa427ffe841.tar.gz
redmine-dfd02040521b84c64e9aa5d7b70ccfa427ffe841.zip
Add view_issues permission (#3187).
A migration adds this permission to all existing roles to preserve current behaviour. This permission controls access to issues, roadmap and changelog. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3039 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20091114105931_add_view_issues_permission.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/db/migrate/20091114105931_add_view_issues_permission.rb b/db/migrate/20091114105931_add_view_issues_permission.rb
new file mode 100644
index 000000000..5092a8c9d
--- /dev/null
+++ b/db/migrate/20091114105931_add_view_issues_permission.rb
@@ -0,0 +1,13 @@
+class AddViewIssuesPermission < ActiveRecord::Migration
+ def self.up
+ Role.find(:all).each do |r|
+ r.add_permission!(:view_issues)
+ end
+ end
+
+ def self.down
+ Role.find(:all).each do |r|
+ r.remove_permission!(:view_issues)
+ end
+ end
+end