view .svn/pristine/6d/6d6109d0a05e56194e4d35c31ae6b55d51c938dc.svn-base @ 1471:d65e60e20a50 bug_531

Close obsolete branch bug_531
author Chris Cannam
date Fri, 23 Nov 2012 18:10:33 +0000
parents cbb26bc654de
children
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