Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf53b85b

Browse files
committed
feat: add shared_with_group_id param to sql query
1 parent3789a52 commitf53b85b

File tree

3 files changed

+20
-5
lines changed

3 files changed

+20
-5
lines changed

‎coderd/database/modelqueries.go‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,7 @@ func (q *sqlQuerier) GetAuthorizedWorkspaces(ctx context.Context, arg GetWorkspa
277277
arg.HasExternalAgent,
278278
arg.Shared,
279279
arg.SharedWithUserID,
280+
arg.SharedWithGroupID,
280281
arg.RequesterID,
281282
arg.Offset,
282283
arg.Limit,

‎coderd/database/queries.sql.go‎

Lines changed: 13 additions & 5 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎coderd/database/queries/workspaces.sql‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,12 @@ WHERE
390390
workspaces.user_acl ? (@shared_with_user_id :: uuid) ::text
391391
ELSE true
392392
END
393+
-- Filter by shared_with_group_id
394+
AND CASE
395+
WHEN @shared_with_group_id :: uuid!='00000000-0000-0000-0000-000000000000'::uuid THEN
396+
workspaces.group_acl ? (@shared_with_group_id :: uuid) ::text
397+
ELSE true
398+
END
393399
-- Authorize Filter clause will be injected below in GetAuthorizedWorkspaces
394400
-- @authorize_filter
395401
), filtered_workspaces_orderAS (

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp