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

Commitd11d83c

Browse files
authored
chore: Template-admin cannot create/update/delete workspaces (#4329)
This perm was changed to only be able to read workspaces
1 parentbbebc1a commitd11d83c

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

‎coderd/rbac/builtin_test.go

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,15 +174,25 @@ func TestRolePermissions(t *testing.T) {
174174
},
175175
},
176176
{
177-
Name:"MyWorkspaceInOrg",
177+
Name:"ReadMyWorkspaceInOrg",
178178
// When creating the WithID won't be set, but it does not change the result.
179-
Actions: []rbac.Action{rbac.ActionCreate,rbac.ActionRead,rbac.ActionUpdate,rbac.ActionDelete},
179+
Actions: []rbac.Action{rbac.ActionRead},
180180
Resource:rbac.ResourceWorkspace.InOrg(orgID).WithOwner(currentUser.String()),
181181
AuthorizeMap:map[bool][]authSubject{
182182
true: {owner,orgMemberMe,orgAdmin,templateAdmin},
183183
false: {memberMe,otherOrgAdmin,otherOrgMember,userAdmin},
184184
},
185185
},
186+
{
187+
Name:"C_RDMyWorkspaceInOrg",
188+
// When creating the WithID won't be set, but it does not change the result.
189+
Actions: []rbac.Action{rbac.ActionCreate,rbac.ActionUpdate,rbac.ActionDelete},
190+
Resource:rbac.ResourceWorkspace.InOrg(orgID).WithOwner(currentUser.String()),
191+
AuthorizeMap:map[bool][]authSubject{
192+
true: {owner,orgMemberMe,orgAdmin},
193+
false: {memberMe,otherOrgAdmin,otherOrgMember,userAdmin,templateAdmin},
194+
},
195+
},
186196
{
187197
Name:"MyWorkspaceInOrgExecution",
188198
// When creating the WithID won't be set, but it does not change the result.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp