Show visible spent time link for users allowed to view time entries (#20661).

Patch by Go MAEDA.

git-svn-id: http://svn.redmine.org/redmine/trunk@16292 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2017-01-29 10:28:48 +00:00
parent 0554e1f3cb
commit cb985627e2
2 changed files with 6 additions and 1 deletions

View File

@@ -101,6 +101,11 @@ class IssuesController < ApplicationController
@changesets.reverse!
end
if User.current.allowed_to?(:view_time_entries, @project)
Issue.load_visible_spent_hours([@issue])
Issue.load_visible_total_spent_hours([@issue])
end
respond_to do |format|
format.html {
@allowed_statuses = @issue.new_statuses_allowed_to(User.current)