feat: add workspaces/acl [delete] endpoint (#19772)

Closes
[coder/internal#971](https://github.com/coder/internal/issues/971)
This commit is contained in:
Brett Kolodny
2025-09-12 12:21:01 -04:00
committed by GitHub
parent 8e79dbb16f
commit 854f3c0187
15 changed files with 371 additions and 0 deletions
+15
View File
@@ -20141,6 +20141,21 @@ func (q *sqlQuerier) BatchUpdateWorkspaceNextStartAt(ctx context.Context, arg Ba
return err
}
const deleteWorkspaceACLByID = `-- name: DeleteWorkspaceACLByID :exec
UPDATE
workspaces
SET
group_acl = '{}'::json,
user_acl = '{}'::json
WHERE
id = $1
`
func (q *sqlQuerier) DeleteWorkspaceACLByID(ctx context.Context, id uuid.UUID) error {
_, err := q.db.ExecContext(ctx, deleteWorkspaceACLByID, id)
return err
}
const favoriteWorkspace = `-- name: FavoriteWorkspace :exec
UPDATE workspaces SET favorite = true WHERE id = $1
`