From cd83c2ca051f9d6a3f7b2842e19aaa2c069cf769 Mon Sep 17 00:00:00 2001 From: Lauris BH Date: Thu, 24 Jan 2019 12:22:27 +0200 Subject: [PATCH] Fix topics saving internal error and disable for archived repos (#5821) --- routers/routes/routes.go | 2 +- templates/repo/home.tmpl | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/routers/routes/routes.go b/routers/routes/routes.go index 628798189423..6445c0a9af5f 100644 --- a/routers/routes/routes.go +++ b/routers/routes/routes.go @@ -652,7 +652,7 @@ func RegisterRoutes(m *macaron.Macaron) { m.Group("/:username/:reponame", func() { m.Post("/topics", repo.TopicsPost) - }, context.RepoMustNotBeArchived(), context.RepoAssignment(), reqRepoAdmin) + }, context.RepoAssignment(), context.RepoMustNotBeArchived(), reqRepoAdmin) m.Group("/:username/:reponame", func() { m.Group("", func() { diff --git a/templates/repo/home.tmpl b/templates/repo/home.tmpl index 6133464549f0..5e07f0f39d8f 100644 --- a/templates/repo/home.tmpl +++ b/templates/repo/home.tmpl @@ -25,9 +25,9 @@
{{range .Topics}}{{.Name}}{{end}} - {{if .Permission.IsAdmin}}{{.i18n.Tr "repo.topic.manage_topics"}}{{end}} + {{if and .Permission.IsAdmin (not .Repository.IsArchived)}}{{.i18n.Tr "repo.topic.manage_topics"}}{{end}}
- {{if .Permission.IsAdmin}} + {{if and .Permission.IsAdmin (not .Repository.IsArchived)}}