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

Commit1979cde

Browse files
committed
feat: Implement view for workspace builds to include rbac info
Removes the need to fetch the workspace to run an rbac check.
1 parentd30da81 commit1979cde

File tree

8 files changed

+120
-52
lines changed

8 files changed

+120
-52
lines changed

‎coderd/database/dump.sql

Lines changed: 33 additions & 14 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
DROPVIEW workspace_builds_rbac;
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
BEGIN;
2+
-- workspace_builds_rbac includes the linked workspace information
3+
-- required to perform RBAC checks on workspace builds without needing
4+
-- to fetch the workspace.
5+
CREATEVIEWworkspace_builds_rbacAS
6+
SELECT
7+
workspace_builds.*,
8+
workspaces.organization_idAS organization_id,
9+
workspaces.owner_idAS workspace_owner_id
10+
FROM
11+
workspace_builds
12+
INNER JOIN
13+
workspacesONworkspace_builds.workspace_id=workspaces.id;
14+
COMMIT;

‎coderd/database/models.go

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

‎coderd/database/querier.go

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

‎coderd/database/queries.sql.go

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

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp