##// END OF EJS Templates
Merged r13471....
Merged r13471. git-svn-id: http://svn.redmine.org/redmine/branches/2.6-stable@13472 e93f8b46-1217-0410-a6f0-8f06a7374b81

File last commit:

r12147:9b5ce4b7b44b
r13091:05c2cea56fbe
Show More
050_add_wiki_attachments_permissions.rb
14 lines | 748 B | text/x-ruby | RubyLexer
/ db / migrate / 050_add_wiki_attachments_permissions.rb
Jean-Philippe Lang
Attachments can now be added to wiki pages (original patch by Pavol Murin). Only authorized users can add/delete attachments....
r538 class AddWikiAttachmentsPermissions < ActiveRecord::Migration
Jean-Philippe Lang
Merged 0.6 branch into trunk....
r663 # model removed
class Permission < ActiveRecord::Base; end
Jean-Philippe Lang
Attachments can now be added to wiki pages (original patch by Pavol Murin). Only authorized users can add/delete attachments....
r538 def self.up
Permission.create :controller => 'wiki', :action => 'add_attachment', :description => 'label_attachment_new', :sort => 1750, :is_public => false, :mail_option => 0, :mail_enabled => 0
Permission.create :controller => 'wiki', :action => 'destroy_attachment', :description => 'label_attachment_delete', :sort => 1755, :is_public => false, :mail_option => 0, :mail_enabled => 0
end
def self.down
Toshi MARUYAMA
Rails4: db migrate: replace "Permission.find_by_controller_and_action"...
r12147 Permission.where(:controller => "wiki", :action => "add_attachment").each {|p| p.destroy}
Permission.where(:controller => "wiki", :action => "destroy_attachment").each {|p| p.destroy}
Jean-Philippe Lang
Attachments can now be added to wiki pages (original patch by Pavol Murin). Only authorized users can add/delete attachments....
r538 end
end