summaryrefslogtreecommitdiffstats
path: root/db
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2007-05-25 16:44:50 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2007-05-25 16:44:50 +0000
commit6446c312beab7e23162827a79bd9ab6f9e4d7958 (patch)
tree4ea3f9dc23b786f77e803ce63d76e62f1f57d81e /db
parent4a524ff911edefeae8753669bb27000486741fbb (diff)
downloadredmine-6446c312beab7e23162827a79bd9ab6f9e4d7958.tar.gz
redmine-6446c312beab7e23162827a79bd9ab6f9e4d7958.zip
Added the ability to destroy wiki pages (content and its history are deleted from the database).
This permission has to be explicitly given (Roles & Permissions -> Wiki pages/Delete). git-svn-id: http://redmine.rubyforge.org/svn/trunk@540 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'db')
-rw-r--r--db/migrate/049_add_wiki_destroy_page_permission.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/db/migrate/049_add_wiki_destroy_page_permission.rb b/db/migrate/049_add_wiki_destroy_page_permission.rb
new file mode 100644
index 000000000..c68370f22
--- /dev/null
+++ b/db/migrate/049_add_wiki_destroy_page_permission.rb
@@ -0,0 +1,9 @@
+class AddWikiDestroyPagePermission < ActiveRecord::Migration
+ def self.up
+ Permission.create :controller => 'wiki', :action => 'destroy', :description => 'button_delete', :sort => 1740, :is_public => false, :mail_option => 0, :mail_enabled => 0
+ end
+
+ def self.down
+ Permission.find_by_controller_and_action('wiki', 'destroy').destroy
+ end
+end