mirror of
https://github.com/meineerde/redmine.git
synced 2025-12-19 23:11:12 +00:00
This will be changed to true in the future. git-svn-id: http://svn.redmine.org/redmine/trunk@17947 e93f8b46-1217-0410-a6f0-8f06a7374b81
21 lines
1.2 KiB
Ruby
21 lines
1.2 KiB
Ruby
# frozen_string_literal: false
|
|
|
|
class SetDocAndFilesNotifications < ActiveRecord::Migration[4.2]
|
|
# model removed
|
|
class Permission < ActiveRecord::Base; end
|
|
|
|
def self.up
|
|
Permission.where(:controller => "projects", :action => "add_file").each {|p| p.update_attribute(:mail_option, true)}
|
|
Permission.where(:controller => "projects", :action => "add_document").each {|p| p.update_attribute(:mail_option, true)}
|
|
Permission.where(:controller => "documents", :action => "add_attachment").each {|p| p.update_attribute(:mail_option, true)}
|
|
Permission.where(:controller => "issues", :action => "add_attachment").each {|p| p.update_attribute(:mail_option, true)}
|
|
end
|
|
|
|
def self.down
|
|
Permission.where(:controller => "projects", :action => "add_file").each {|p| p.update_attribute(:mail_option, false)}
|
|
Permission.where(:controller => "projects", :action => "add_document").each {|p| p.update_attribute(:mail_option, false)}
|
|
Permission.where(:controller => "documents", :action => "add_attachment").each {|p| p.update_attribute(:mail_option, false)}
|
|
Permission.where(:controller => "issues", :action => "add_attachment").each {|p| p.update_attribute(:mail_option, false)}
|
|
end
|
|
end
|