From 80fd25524e13dedbdc3527b32d008de152213a89 Mon Sep 17 00:00:00 2001 From: KN4CK3R Date: Tue, 22 Mar 2022 08:03:22 +0100 Subject: Renamed ctx.User to ctx.Doer. (#19161) Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: wxiaoguang --- routers/web/repo/issue_label.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'routers/web/repo/issue_label.go') diff --git a/routers/web/repo/issue_label.go b/routers/web/repo/issue_label.go index c6fa8c4c8c..d1470910d4 100644 --- a/routers/web/repo/issue_label.go +++ b/routers/web/repo/issue_label.go @@ -82,8 +82,8 @@ func RetrieveLabels(ctx *context.Context) { ctx.ServerError("GetOrgByName", err) return } - if ctx.User != nil { - ctx.Org.IsOwner, err = org.IsOwnedBy(ctx.User.ID) + if ctx.Doer != nil { + ctx.Org.IsOwner, err = org.IsOwnedBy(ctx.Doer.ID) if err != nil { ctx.ServerError("org.IsOwnedBy", err) return @@ -169,7 +169,7 @@ func UpdateIssueLabel(ctx *context.Context) { switch action := ctx.FormString("action"); action { case "clear": for _, issue := range issues { - if err := issue_service.ClearLabels(issue, ctx.User); err != nil { + if err := issue_service.ClearLabels(issue, ctx.Doer); err != nil { ctx.ServerError("ClearLabels", err) return } @@ -198,14 +198,14 @@ func UpdateIssueLabel(ctx *context.Context) { if action == "attach" { for _, issue := range issues { - if err = issue_service.AddLabel(issue, ctx.User, label); err != nil { + if err = issue_service.AddLabel(issue, ctx.Doer, label); err != nil { ctx.ServerError("AddLabel", err) return } } } else { for _, issue := range issues { - if err = issue_service.RemoveLabel(issue, ctx.User, label); err != nil { + if err = issue_service.RemoveLabel(issue, ctx.Doer, label); err != nil { ctx.ServerError("RemoveLabel", err) return } -- cgit v1.2.3