summaryrefslogtreecommitdiffstats
path: root/routers/repo
diff options
context:
space:
mode:
authorJohn Olheiser <42128690+jolheiser@users.noreply.github.com>2019-03-15 10:50:27 -0500
committertechknowlogick <matti@mdranta.net>2019-03-15 11:50:27 -0400
commitc55bdca562e8fffaaf4028cf9563443027d52970 (patch)
tree0d8fa54f1d6f9f76d6a98d630a86ec4a5d9b324c /routers/repo
parent583968f274b85d1c9184c614cbdae763899f7827 (diff)
downloadgitea-c55bdca562e8fffaaf4028cf9563443027d52970.tar.gz
gitea-c55bdca562e8fffaaf4028cf9563443027d52970.zip
Add same changes from issues page to milestone->issues page (#6328)
Diffstat (limited to 'routers/repo')
-rw-r--r--routers/repo/milestone.go8
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)
}