mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
chore: add organization search query to workspaces (#14474)
* chore: add organization search query to workspaces
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user