summaryrefslogtreecommitdiffstats
path: root/app/models
diff options
context:
space:
mode:
Diffstat (limited to 'app/models')
-rw-r--r--app/models/time_entry.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/time_entry.rb b/app/models/time_entry.rb
index b133f502a..ea33c0bc6 100644
--- a/app/models/time_entry.rb
+++ b/app/models/time_entry.rb
@@ -95,7 +95,7 @@ class TimeEntry < ActiveRecord::Base
if attrs
attrs = super(attrs)
if issue_id_changed? && issue
- if user.allowed_to?(:log_time, issue.project)
+ if issue.visible?(user) && user.allowed_to?(:log_time, issue.project)
if attrs[:project_id].blank? && issue.project_id != project_id
self.project_id = issue.project_id
end