annotate .svn/pristine/d1/d15d22e896df1ceb447206228d825c081bb8bbc6.svn-base @ 1548:fd4cc11ae096 feature_1136

Skip private projects
author Chris Cannam
date Tue, 12 Jan 2016 17:32:31 +0000
parents dffacf8a6908
children
rev   line source
Chris@1517 1 class AddWikiAttachmentsPermissions < ActiveRecord::Migration
Chris@1517 2 # model removed
Chris@1517 3 class Permission < ActiveRecord::Base; end
Chris@1517 4
Chris@1517 5 def self.up
Chris@1517 6 Permission.create :controller => 'wiki', :action => 'add_attachment', :description => 'label_attachment_new', :sort => 1750, :is_public => false, :mail_option => 0, :mail_enabled => 0
Chris@1517 7 Permission.create :controller => 'wiki', :action => 'destroy_attachment', :description => 'label_attachment_delete', :sort => 1755, :is_public => false, :mail_option => 0, :mail_enabled => 0
Chris@1517 8 end
Chris@1517 9
Chris@1517 10 def self.down
Chris@1517 11 Permission.where(:controller => "wiki", :action => "add_attachment").each {|p| p.destroy}
Chris@1517 12 Permission.where(:controller => "wiki", :action => "destroy_attachment").each {|p| p.destroy}
Chris@1517 13 end
Chris@1517 14 end