Mercurial > hg > soundsoftware-site
view db/migrate/097_add_view_wiki_edits_permission.rb @ 1477:f2ad2199b49a bibplugin_integration
Close obsolete branch bibplugin_integration
author | Chris Cannam |
---|---|
date | Fri, 30 Nov 2012 14:41:31 +0000 |
parents | cbb26bc654de |
children | 622f24f53b42 |
line wrap: on
line source
class AddViewWikiEditsPermission < 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