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

Commit9b3f94e

Browse files
committed
chore: add workspace share scope and action
1 parent0e0f092 commit9b3f94e

File tree

9 files changed

+29
-3
lines changed

9 files changed

+29
-3
lines changed

‎coderd/database/dump.sql‎

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
-- No-op: keep enum values to avoid dependency churn.
2+
-- If strict removal is required, create a new enum type without these values,
3+
-- cast columns, drop the old type, and rename.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
ALTERTYPE api_key_scope ADD VALUE IF NOT EXISTS'workspace:share';
2+
ALTERTYPE api_key_scope ADD VALUE IF NOT EXISTS'workspace_dormant:share';

‎coderd/rbac/object_gen.go‎

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

‎coderd/rbac/policy/policy.go‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ const (
2727

2828
ActionCreateAgentAction="create_agent"
2929
ActionDeleteAgentAction="delete_agent"
30+
31+
ActionShareAction="share"
3032
)
3133

3234
typePermissionDefinitionstruct {
@@ -61,6 +63,9 @@ var workspaceActions = map[Action]ActionDefinition{
6163

6264
ActionCreateAgent:"create a new workspace agent",
6365
ActionDeleteAgent:"delete an existing workspace agent",
66+
67+
// Sharing a workspace
68+
ActionShare:"share a workspace with other users or groups",
6469
}
6570

6671
// RBACPermissions is indexed by the type

‎coderd/rbac/scopes_constants_gen.go‎

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

‎codersdk/rbacresources_gen.go‎

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

‎site/src/api/rbacresourcesGenerated.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ export const RBACResourceActions: Partial<
195195
delete:"delete workspace",
196196
delete_agent:"delete an existing workspace agent",
197197
read:"read workspace data to view on the UI",
198+
share:"share a workspace with other users or groups",
198199
ssh:"ssh into a given workspace",
199200
start:"allows starting a workspace",
200201
stop:"allows stopping a workspace",
@@ -215,6 +216,7 @@ export const RBACResourceActions: Partial<
215216
delete:"delete workspace",
216217
delete_agent:"delete an existing workspace agent",
217218
read:"read workspace data to view on the UI",
219+
share:"share a workspace with other users or groups",
218220
ssh:"ssh into a given workspace",
219221
start:"allows starting a workspace",
220222
stop:"allows stopping a workspace",

‎site/src/api/typesGenerated.ts‎

Lines changed: 2 additions & 0 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