mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-09-10 15:48:29 +02:00
fix: show membership of limited orgs
- Include organisations with visibility of limited if the visitor is signed in. - Resolves forgejo/forgejo#8093 - Added unit test.
This commit is contained in:
parent
82e4ccc223
commit
b68f923592
4 changed files with 29 additions and 3 deletions
|
@ -67,6 +67,7 @@ func PrepareContextForProfileBigAvatar(ctx *context.Context) {
|
|||
showPrivate := ctx.IsSigned && (ctx.Doer.IsAdmin || ctx.Doer.ID == ctx.ContextUser.ID)
|
||||
orgs, err := db.Find[organization.Organization](ctx, organization.FindOrgOptions{
|
||||
UserID: ctx.ContextUser.ID,
|
||||
IncludeLimited: ctx.IsSigned,
|
||||
IncludePrivate: showPrivate,
|
||||
})
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue