mirror of
https://github.com/coder/coder.git
synced 2025-07-06 15:41:45 +00:00
feat: Add endpoint to get all workspaces a user can access (#1354)
This iterates through user organizations to get permitted workspaces. This will allow admins to manage user workspaces!
This commit is contained in:
@ -11,6 +11,9 @@ LIMIT
|
||||
-- name: GetWorkspacesByOrganizationID :many
|
||||
SELECT * FROM workspaces WHERE organization_id = $1 AND deleted = $2;
|
||||
|
||||
-- name: GetWorkspacesByOrganizationIDs :many
|
||||
SELECT * FROM workspaces WHERE organization_id = ANY(@ids :: uuid [ ]) AND deleted = @deleted;
|
||||
|
||||
-- name: GetWorkspacesByTemplateID :many
|
||||
SELECT
|
||||
*
|
||||
|
Reference in New Issue
Block a user