fix(build): org list API and unused import #412
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user