Add same changes from issues page to milestone->issues page (#6328)

This commit is contained in:
John Olheiser 2019-03-15 10:50:27 -05:00 committed by techknowlogick
parent 583968f274
commit c55bdca562
4 changed files with 35 additions and 11 deletions

View file

@ -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)
}

View file

@ -635,7 +635,7 @@ func RegisterRoutes(m *macaron.Macaron) {
}, context.RepoMustNotBeArchived(), reqRepoIssuesOrPullsWriter, context.RepoRef())
m.Group("/milestone", func() {
m.Get("/:id", repo.MilestoneIssuesAndPulls)
}, reqRepoIssuesOrPullsWriter, context.RepoRef())
}, reqRepoIssuesOrPullsReader, context.RepoRef())
m.Combo("/compare/*", context.RepoMustNotBeArchived(), reqRepoCodeReader, reqRepoPullsReader, repo.MustAllowPulls, repo.SetEditorconfigIfExists).
Get(repo.SetDiffViewStyle, repo.CompareAndPullRequest).
Post(bindIgnErr(auth.CreateIssueForm{}), repo.CompareAndPullRequestPost)