view .svn/pristine/58/58798d95d2677f7c2652f875b5506cce3ae90864.svn-base @ 1298:4f746d8966dd redmine_2.3_integration

Merge from redmine-2.3 branch to create new branch redmine-2.3-integration
author Chris Cannam
date Fri, 14 Jun 2013 09:28:30 +0100
parents cbb26bc654de
children
line wrap: on
line source
class AddDeleteWikiPagesAttachmentsPermission < ActiveRecord::Migration
  def self.up
    Role.find(:all).each do |r|
      r.add_permission!(:delete_wiki_pages_attachments) if r.has_permission?(:edit_wiki_pages)
    end
  end

  def self.down
    Role.find(:all).each do |r|
      r.remove_permission!(:delete_wiki_pages_attachments)
    end
  end
end