You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

050_add_wiki_attachments_permissions.rb 753B

1234567891011121314
  1. class AddWikiAttachmentsPermissions < ActiveRecord::Migration[4.2]
  2. # model removed
  3. class Permission < ActiveRecord::Base; end
  4. def self.up
  5. Permission.create :controller => 'wiki', :action => 'add_attachment', :description => 'label_attachment_new', :sort => 1750, :is_public => false, :mail_option => 0, :mail_enabled => 0
  6. Permission.create :controller => 'wiki', :action => 'destroy_attachment', :description => 'label_attachment_delete', :sort => 1755, :is_public => false, :mail_option => 0, :mail_enabled => 0
  7. end
  8. def self.down
  9. Permission.where(:controller => "wiki", :action => "add_attachment").each {|p| p.destroy}
  10. Permission.where(:controller => "wiki", :action => "destroy_attachment").each {|p| p.destroy}
  11. end
  12. end