comparison app/models/time_entry.rb @ 1517:dffacf8a6908 redmine-2.5

Update to Redmine SVN revision 13367 on 2.5-stable branch
author Chris Cannam
date Tue, 09 Sep 2014 09:29:00 +0100
parents e248c7af89ec
children
comparison
equal deleted inserted replaced
1516:b450a9d58aed 1517:dffacf8a6908
75 end 75 end
76 self.hours = nil if hours == 0 76 self.hours = nil if hours == 0
77 end 77 end
78 end 78 end
79 79
80 def safe_attributes=(attrs, user=User.current)
81 attrs = super
82 if !new_record? && issue && issue.project_id != project_id
83 if user.allowed_to?(:log_time, issue.project)
84 self.project_id = issue.project_id
85 end
86 end
87 attrs
88 end
89
80 def set_project_if_nil 90 def set_project_if_nil
81 self.project = issue.project if issue && project.nil? 91 self.project = issue.project if issue && project.nil?
82 end 92 end
83 93
84 def validate_time_entry 94 def validate_time_entry