chore: add organization search query to workspaces (#14474)

* chore: add organization search query to workspaces
This commit is contained in:
Steven Masley
2024-08-28 15:18:45 -05:00
committed by GitHub
parent 54fe082551
commit b96ac677f1
7 changed files with 109 additions and 78 deletions

View File

@ -9972,6 +9972,12 @@ func (q *FakeQuerier) GetAuthorizedWorkspaces(ctx context.Context, arg database.
}
}
if arg.OrganizationID != uuid.Nil {
if workspace.OrganizationID != arg.OrganizationID {
continue
}
}
if arg.OwnerUsername != "" {
owner, err := q.getUserByIDNoLock(workspace.OwnerID)
if err == nil && !strings.EqualFold(arg.OwnerUsername, owner.Username) {