To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.
root / .svn / pristine / 58 / 58798d95d2677f7c2652f875b5506cce3ae90864.svn-base @ 1297:0a574315af3e
History | View | Annotate | Download (353 Bytes)
| 1 |
class AddDeleteWikiPagesAttachmentsPermission < ActiveRecord::Migration |
|---|---|
| 2 |
def self.up |
| 3 |
Role.find(:all).each do |r| |
| 4 |
r.add_permission!(:delete_wiki_pages_attachments) if r.has_permission?(:edit_wiki_pages) |
| 5 |
end |
| 6 |
end |
| 7 |
|
| 8 |
def self.down |
| 9 |
Role.find(:all).each do |r| |
| 10 |
r.remove_permission!(:delete_wiki_pages_attachments) |
| 11 |
end |
| 12 |
end |
| 13 |
end |