summaryrefslogtreecommitdiffstats
path: root/db
diff options
context:
space:
mode:
Diffstat (limited to 'db')
-rw-r--r--db/migrate/097_add_wiew_wiki_edits_permission.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/db/migrate/097_add_wiew_wiki_edits_permission.rb b/db/migrate/097_add_wiew_wiki_edits_permission.rb
new file mode 100644
index 000000000..0f87ada28
--- /dev/null
+++ b/db/migrate/097_add_wiew_wiki_edits_permission.rb
@@ -0,0 +1,13 @@
+class AddWiewWikiEditsPermission < ActiveRecord::Migration
+ def self.up
+ Role.find(:all).each do |r|
+ r.add_permission!(:view_wiki_edits) if r.has_permission?(:view_wiki_pages)
+ end
+ end
+
+ def self.down
+ Role.find(:all).each do |r|
+ r.remove_permission!(:view_wiki_edits)
+ end
+ end
+end