diff options
author | KN4CK3R <admin@oldschoolhack.me> | 2022-03-22 08:03:22 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-22 15:03:22 +0800 |
commit | 80fd25524e13dedbdc3527b32d008de152213a89 (patch) | |
tree | 63b2bfe4ffaf1dce12080cabdc2e845c8731a673 /routers/web/repo/issue_label.go | |
parent | 5495ba7660979973ba19e304786135da474e0e64 (diff) | |
download | gitea-80fd25524e13dedbdc3527b32d008de152213a89.tar.gz gitea-80fd25524e13dedbdc3527b32d008de152213a89.zip |
Renamed ctx.User to ctx.Doer. (#19161)
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Diffstat (limited to 'routers/web/repo/issue_label.go')
-rw-r--r-- | routers/web/repo/issue_label.go | 10 |
1 files changed, 5 insertions, 5 deletions
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 } |