aboutsummaryrefslogtreecommitdiffstats
path: root/routers/repo/issue.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/repo/issue.go')
-rw-r--r--routers/repo/issue.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/routers/repo/issue.go b/routers/repo/issue.go
index 6dbf9cf5c8..0697d11a66 100644
--- a/routers/repo/issue.go
+++ b/routers/repo/issue.go
@@ -487,6 +487,8 @@ func NewIssue(ctx *context.Context) {
return
}
+ ctx.Data["HasIssuesOrPullsWritePermission"] = ctx.Repo.CanWrite(models.UnitTypeIssues)
+
ctx.HTML(200, tplIssueNew)
}
@@ -1076,7 +1078,7 @@ func ViewIssue(ctx *context.Context) {
ctx.Data["ReadOnly"] = true
ctx.Data["SignInLink"] = setting.AppSubURL + "/user/login?redirect_to=" + ctx.Data["Link"].(string)
ctx.Data["IsIssuePoster"] = ctx.IsSigned && issue.IsPoster(ctx.User.ID)
- ctx.Data["IsIssueWriter"] = ctx.Repo.CanWriteIssuesOrPulls(issue.IsPull)
+ ctx.Data["HasIssuesOrPullsWritePermission"] = ctx.Repo.CanWriteIssuesOrPulls(issue.IsPull)
ctx.Data["IsRepoAdmin"] = ctx.IsSigned && (ctx.Repo.IsAdmin() || ctx.User.IsAdmin)
ctx.Data["LockReasons"] = setting.Repository.Issue.LockReasons
ctx.HTML(200, tplIssueView)