To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.

Statistics Download as Zip
| Branch: | Tag: | Revision:

root / db / migrate / 099_add_delete_wiki_pages_attachments_permission.rb @ 1298:4f746d8966dd

History | View | Annotate | Download (339 Bytes)

1 0:513646585e45 Chris
class AddDeleteWikiPagesAttachmentsPermission < ActiveRecord::Migration
2
  def self.up
3 1295:622f24f53b42 Chris
    Role.all.each do |r|
4 909:cbb26bc654de Chris
      r.add_permission!(:delete_wiki_pages_attachments) if r.has_permission?(:edit_wiki_pages)
5
    end
6 0:513646585e45 Chris
  end
7
8
  def self.down
9 1295:622f24f53b42 Chris
    Role.all.each do |r|
10 909:cbb26bc654de Chris
      r.remove_permission!(:delete_wiki_pages_attachments)
11
    end
12 0:513646585e45 Chris
  end
13
end