diff options
Diffstat (limited to 'routers/repo/milestone.go')
-rw-r--r-- | routers/repo/milestone.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/routers/repo/milestone.go b/routers/repo/milestone.go index 6c3ad11f1f..632c792c43 100644 --- a/routers/repo/milestone.go +++ b/routers/repo/milestone.go @@ -260,5 +260,13 @@ func MilestoneIssuesAndPulls(ctx *context.Context) { issues(ctx, milestoneID, util.OptionalBoolNone) + perm, err := models.GetUserRepoPermission(ctx.Repo.Repository, ctx.User) + if err != nil { + ctx.ServerError("GetUserRepoPermission", err) + return + } + ctx.Data["CanWriteIssues"] = perm.CanWriteIssuesOrPulls(false) + ctx.Data["CanWritePulls"] = perm.CanWriteIssuesOrPulls(true) + ctx.HTML(200, tplMilestoneIssues) } |