Skip to content

Commit 6ac1ba2

Browse files
committed
do not return locked workspaces by default
1 parent d50d37b commit 6ac1ba2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

coderd/database/queries/workspaces.sql

+4-2
Original file line numberDiff line numberDiff line change
@@ -259,11 +259,13 @@ WHERE
259259
) > 0
260260
ELSE true
261261
END
262-
-- Filter by locked workspaces.
262+
-- Filter by locked workspaces. By default we do not return locked
263+
-- workspaces since they are considered soft-deleted.
263264
AND CASE
264265
WHEN @locked_at :: timestamptz > '0001-01-01 00:00:00+00'::timestamptz THEN
265266
locked_at IS NOT NULL AND locked_at >= @locked_at
266-
ELSE true
267+
ELSE
268+
locked_at IS NULL
267269
END
268270
-- Authorize Filter clause will be injected below in GetAuthorizedWorkspaces
269271
-- @authorize_filter

0 commit comments

Comments
 (0)