[GITEA] admin: "Self Check" should only show for some db types
The "Self Check" menu essentially runs the collation check that is also performed at startup, and displays the results. This is only a thing for MariaDB/MySQL and MSSQL. As such, the menu item should only be available for these database types. Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu> (cherry picked from commit 0ca118fdc3c39c0e7adf9285e074e5878a0ca1c1)
This commit is contained in:
parent
76c2f5bf92
commit
c335d076aa
3 changed files with 30 additions and 1 deletions
|
@ -676,7 +676,9 @@ func registerRoutes(m *web.Route) {
|
|||
m.Get("", admin.Dashboard)
|
||||
m.Post("", web.Bind(forms.AdminDashboardForm{}), admin.DashboardPost)
|
||||
|
||||
m.Get("/self_check", admin.SelfCheck)
|
||||
if setting.Database.Type.IsMySQL() || setting.Database.Type.IsMSSQL() {
|
||||
m.Get("/self_check", admin.SelfCheck)
|
||||
}
|
||||
|
||||
m.Group("/config", func() {
|
||||
m.Get("", admin.Config)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue