Redmine 3.4.4
This commit is contained in:
commit
64924a6376
2112 changed files with 259028 additions and 0 deletions
18
db/migrate/018_set_doc_and_files_notifications.rb
Normal file
18
db/migrate/018_set_doc_and_files_notifications.rb
Normal file
|
@ -0,0 +1,18 @@
|
|||
class SetDocAndFilesNotifications < ActiveRecord::Migration
|
||||
# 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
|
Loading…
Add table
Add a link
Reference in a new issue