##// END OF EJS Templates
replace tabs to spaces at db/migrate/099_add_delete_wiki_pages_attachments_permission.rb (#9510)...
Toshi MARUYAMA -
r7636:67ac04e49afc
parent child
Show More
@@ -1,13 +1,13
1 class AddDeleteWikiPagesAttachmentsPermission < ActiveRecord::Migration
1 class AddDeleteWikiPagesAttachmentsPermission < ActiveRecord::Migration
2 def self.up
2 def self.up
3 Role.find(:all).each do |r|
3 Role.find(:all).each do |r|
4 r.add_permission!(:delete_wiki_pages_attachments) if r.has_permission?(:edit_wiki_pages)
4 r.add_permission!(:delete_wiki_pages_attachments) if r.has_permission?(:edit_wiki_pages)
5 end
5 end
6 end
6 end
7
7
8 def self.down
8 def self.down
9 Role.find(:all).each do |r|
9 Role.find(:all).each do |r|
10 r.remove_permission!(:delete_wiki_pages_attachments)
10 r.remove_permission!(:delete_wiki_pages_attachments)
11 end
11 end
12 end
12 end
13 end
13 end
General Comments 0
You need to be logged in to leave comments. Login now