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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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)