mirror of
https://github.com/go-gitea/gitea
synced 2025-07-25 19:58:36 +00:00
Refactor FindOrgOptions to use enum instead of bool, fix membership visibility (#34629)
This commit is contained in:
@@ -47,13 +47,12 @@ func prepareContextForProfileBigAvatar(ctx *context.Context) {
|
||||
ctx.Data["RenderedDescription"] = content
|
||||
}
|
||||
|
||||
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,
|
||||
IncludePrivate: showPrivate,
|
||||
UserID: ctx.ContextUser.ID,
|
||||
IncludeVisibility: organization.DoerViewOtherVisibility(ctx.Doer, ctx.ContextUser),
|
||||
ListOptions: db.ListOptions{
|
||||
Page: 1,
|
||||
// query one more results (without a separate counting) to see whether we need to add the "show more orgs" link
|
||||
// query one more result (without a separate counting) to see whether we need to add the "show more orgs" link
|
||||
PageSize: setting.UI.User.OrgPagingNum + 1,
|
||||
},
|
||||
})
|
||||
|
Reference in New Issue
Block a user