Fix the display of org level badges (#26504)

Follow #24654 #22705 #24232

In some pages we still have missing badges, for example:

![image](f57fae6d-95ad-4996-8881-160c9cd27768)

![image](11e86d43-b715-4d14-bdf0-51bf8b5c7b01)

![image](61c514e7-d8f6-4c93-a61f-60604619e3a7)
This commit is contained in:
yp05327 2023-09-06 15:38:14 +09:00 committed by GitHub
parent 31c92d9695
commit 0850be6750
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 3 additions and 7 deletions

View file

@ -250,6 +250,7 @@ func HandleOrgAssignment(ctx *Context, args ...bool) {
return
}
}
ctx.Data["ContextUser"] = ctx.ContextUser
ctx.Data["CanReadProjects"] = ctx.Org.CanReadUnit(ctx, unit.TypeProjects)
ctx.Data["CanReadPackages"] = ctx.Org.CanReadUnit(ctx, unit.TypePackages)

View file

@ -471,6 +471,7 @@ func RepoAssignment(ctx *Context) context.CancelFunc {
}
ctx.Repo.Owner = owner
ctx.ContextUser = owner
ctx.Data["ContextUser"] = ctx.ContextUser
ctx.Data["Username"] = ctx.Repo.Owner.Name
// redirect link to wiki