diff options
author | kolaente <konrad@kola-entertainments.de> | 2018-05-09 18:29:04 +0200 |
---|---|---|
committer | Lauris BH <lauris@nix.lv> | 2018-05-09 19:29:04 +0300 |
commit | 95f2e2b57beedcdeb2b9623dc86e26f252fdd7bd (patch) | |
tree | ebfeb5b898f72fc57ac1fe9680374fdb4bc91aeb /modules | |
parent | 238a997ec0b5d3e3bed0e55edcacebb44f86d373 (diff) | |
download | gitea-95f2e2b57beedcdeb2b9623dc86e26f252fdd7bd.tar.gz gitea-95f2e2b57beedcdeb2b9623dc86e26f252fdd7bd.zip |
Multiple assignees (#3705)
Diffstat (limited to 'modules')
-rw-r--r-- | modules/auth/repo_form.go | 1 | ||||
-rw-r--r-- | modules/context/repo.go | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/modules/auth/repo_form.go b/modules/auth/repo_form.go index 4aa9ce5f58..431ab7f13e 100644 --- a/modules/auth/repo_form.go +++ b/modules/auth/repo_form.go @@ -254,6 +254,7 @@ func (f *NewDingtalkHookForm) Validate(ctx *macaron.Context, errs binding.Errors type CreateIssueForm struct { Title string `binding:"Required;MaxSize(255)"` LabelIDs string `form:"label_ids"` + AssigneeIDs string `form:"assignee_ids"` Ref string `form:"ref"` MilestoneID int64 AssigneeID int64 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 |