mirror of
https://github.com/redmine/redmine.git
synced 2025-11-04 20:35:57 +01:00
Adds a role setting that viewing all or own time entries (#8929).
git-svn-id: http://svn.redmine.org/redmine/trunk@14275 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -143,7 +143,7 @@ class ProjectsController < ApplicationController
|
||||
@open_issues_by_tracker = Issue.visible.open.where(cond).group(:tracker).count
|
||||
@total_issues_by_tracker = Issue.visible.where(cond).group(:tracker).count
|
||||
|
||||
if User.current.allowed_to?(:view_time_entries, @project)
|
||||
if User.current.allowed_to_view_all_time_entries?(@project)
|
||||
@total_hours = TimeEntry.visible.where(cond).sum(:hours).to_f
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user