2008-10-18 14:07:49 +04:00
|
|
|
class AddDeleteWikiPagesAttachmentsPermission < ActiveRecord::Migration
|
|
|
|
def self.up
|
2011-11-09 12:11:13 +04:00
|
|
|
Role.find(:all).each do |r|
|
|
|
|
r.add_permission!(:delete_wiki_pages_attachments) if r.has_permission?(:edit_wiki_pages)
|
|
|
|
end
|
2008-10-18 14:07:49 +04:00
|
|
|
end
|
|
|
|
|
|
|
|
def self.down
|
2011-11-09 12:11:13 +04:00
|
|
|
Role.find(:all).each do |r|
|
|
|
|
r.remove_permission!(:delete_wiki_pages_attachments)
|
|
|
|
end
|
2008-10-18 14:07:49 +04:00
|
|
|
end
|
|
|
|
end
|