diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-10-18 10:07:49 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-10-18 10:07:49 +0000 |
commit | ccbe48d7791175497f516a341597a78736f79666 (patch) | |
tree | c2612a804cd7271608da186b2fa107fbbfe8e67f /db | |
parent | 64e67f754d638603f338818286e54508f3061a94 (diff) | |
download | redmine-ccbe48d7791175497f516a341597a78736f79666.tar.gz redmine-ccbe48d7791175497f516a341597a78736f79666.zip |
Adds 'Delete wiki pages attachments' permission.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@1938 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/099_add_delete_wiki_pages_attachments_permission.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/db/migrate/099_add_delete_wiki_pages_attachments_permission.rb b/db/migrate/099_add_delete_wiki_pages_attachments_permission.rb new file mode 100644 index 000000000..1ff888f3c --- /dev/null +++ b/db/migrate/099_add_delete_wiki_pages_attachments_permission.rb @@ -0,0 +1,13 @@ +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 |