From 95f2e2b57beedcdeb2b9623dc86e26f252fdd7bd Mon Sep 17 00:00:00 2001 From: kolaente Date: Wed, 9 May 2018 18:29:04 +0200 Subject: Multiple assignees (#3705) --- modules/context/repo.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'modules/context/repo.go') diff --git a/modules/context/repo.go b/modules/context/repo.go index f3ae33cb50..1fe5482ce1 100644 --- a/modules/context/repo.go +++ b/modules/context/repo.go @@ -99,8 +99,9 @@ func (r *Repository) CanUseTimetracker(issue *models.Issue, user *models.User) b // Checking for following: // 1. Is timetracker enabled // 2. Is the user a contributor, admin, poster or assignee and do the repository policies require this? + isAssigned, _ := models.IsUserAssignedToIssue(issue, user) return r.Repository.IsTimetrackerEnabled() && (!r.Repository.AllowOnlyContributorsToTrackTime() || - r.IsWriter() || issue.IsPoster(user.ID) || issue.AssigneeID == user.ID) + r.IsWriter() || issue.IsPoster(user.ID) || isAssigned) } // GetCommitsCount returns cached commit count for current view -- cgit v1.2.3