summaryrefslogtreecommitdiffstats
path: root/routers/web/repo/issue_watch.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/web/repo/issue_watch.go')
-rw-r--r--routers/web/repo/issue_watch.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/routers/web/repo/issue_watch.go b/routers/web/repo/issue_watch.go
index dabbff842b..223fc72071 100644
--- a/routers/web/repo/issue_watch.go
+++ b/routers/web/repo/issue_watch.go
@@ -20,7 +20,7 @@ func IssueWatch(ctx *context.Context) {
return
}
- if !ctx.IsSigned || (ctx.User.ID != issue.PosterID && !ctx.Repo.CanReadIssuesOrPulls(issue.IsPull)) {
+ if !ctx.IsSigned || (ctx.Doer.ID != issue.PosterID && !ctx.Repo.CanReadIssuesOrPulls(issue.IsPull)) {
if log.IsTrace() {
if ctx.IsSigned {
issueType := "issues"
@@ -29,7 +29,7 @@ func IssueWatch(ctx *context.Context) {
}
log.Trace("Permission Denied: User %-v not the Poster (ID: %d) and cannot read %s in Repo %-v.\n"+
"User in Repo has Permissions: %-+v",
- ctx.User,
+ ctx.Doer,
log.NewColoredIDValue(issue.PosterID),
issueType,
ctx.Repo.Repository,
@@ -48,7 +48,7 @@ func IssueWatch(ctx *context.Context) {
return
}
- if err := models.CreateOrUpdateIssueWatch(ctx.User.ID, issue.ID, watch); err != nil {
+ if err := models.CreateOrUpdateIssueWatch(ctx.Doer.ID, issue.ID, watch); err != nil {
ctx.ServerError("CreateOrUpdateIssueWatch", err)
return
}