mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-08-06 09:39:44 +08:00
Added check for disabled Packages (#21540)
At the moment, If admin disable Packages, still show the Packages on the admin dashboard This patch added a check to hide the Packages entry Signed-off-by: baronbunny <its@baronbunny.cn> Signed-off-by: baronbunny <its@baronbunny.cn>
This commit is contained in:
@ -591,6 +591,7 @@ func RegisterRoutes(m *web.Route) {
|
||||
})
|
||||
}, func(ctx *context.Context) {
|
||||
ctx.Data["EnableOAuth2"] = setting.OAuth2.Enable
|
||||
ctx.Data["EnablePackages"] = setting.Packages.Enabled
|
||||
}, adminReq)
|
||||
// ***** END: Admin *****
|
||||
|
||||
|
Reference in New Issue
Block a user