summaryrefslogtreecommitdiffstats
path: root/db
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2017-06-07 20:25:25 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2017-06-07 20:25:25 +0000
commit9b0fcdaf2b6f965f0777dbedbaf0158cf7d927bf (patch)
tree89bde1f6f9865a8b81010d8d9cbc579018e5e2b7 /db
parentd3f93a2907fb5fe42a17727102507dc1ad0ddbb3 (diff)
downloadredmine-9b0fcdaf2b6f965f0777dbedbaf0158cf7d927bf.tar.gz
redmine-9b0fcdaf2b6f965f0777dbedbaf0158cf7d927bf.zip
New permission: view news (#7068).
Patch by Felix Schäfer. git-svn-id: http://svn.redmine.org/redmine/trunk@16639 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20170418090031_add_view_news_to_all_existing_roles.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/db/migrate/20170418090031_add_view_news_to_all_existing_roles.rb b/db/migrate/20170418090031_add_view_news_to_all_existing_roles.rb
new file mode 100644
index 000000000..6f851a1f1
--- /dev/null
+++ b/db/migrate/20170418090031_add_view_news_to_all_existing_roles.rb
@@ -0,0 +1,9 @@
+class AddViewNewsToAllExistingRoles < ActiveRecord::Migration
+ def up
+ Role.all.each { |role| role.add_permission! :view_news }
+ end
+
+ def down
+ # nothing to revert
+ end
+end