diff --git a/routers/web/org/setting.go b/routers/web/org/setting.go index 80e2525f9a..2451bc2542 100644 --- a/routers/web/org/setting.go +++ b/routers/web/org/setting.go @@ -50,11 +50,11 @@ func Settings(ctx *context.Context) { ctx.Data["ContextUser"] = ctx.ContextUser ctx.Data["ParentOrgID"] = ctx.Org.Organization.ParentOrgID - // Load available parent orgs (all orgs the current user owns, excluding self). + // Load available parent orgs (all orgs the current user belongs to, excluding self). if ctx.Doer.IsAdmin || ctx.Org.IsOwner { - orgs, _ := org_model.FindOrgs(ctx, org_model.FindOrgOptions{ - UserID: ctx.Doer.ID, - IncludePrivate: true, + orgs, _ := db.Find[org_model.Organization](ctx, org_model.FindOrgOptions{ + UserID: ctx.Doer.ID, + IncludeVisibility: structs.VisibleTypePrivate, }) var parentCandidates []*org_model.Organization for _, o := range orgs {