1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

Fix global packages enabled avaiable (#19276)

Fix #19275
This commit is contained in:
Lunny Xiao
2022-04-01 01:31:53 +08:00
committed by GitHub
parent c88547ce71
commit 420851ca1f
5 changed files with 32 additions and 19 deletions

View File

@@ -280,6 +280,7 @@ func Profile(ctx *context.Context) {
pager.AddParam(ctx, "language", "Language")
}
ctx.Data["Page"] = pager
ctx.Data["IsPackageEnabled"] = setting.Packages.Enabled
ctx.Data["ShowUserEmail"] = len(ctx.ContextUser.Email) > 0 && ctx.IsSigned && (!ctx.ContextUser.KeepEmailPrivate || ctx.ContextUser.ID == ctx.Doer.ID)