@@ -174,15 +174,25 @@ func TestRolePermissions(t *testing.T) {
174
174
},
175
175
},
176
176
{
177
- Name : "MyWorkspaceInOrg " ,
177
+ Name : "ReadMyWorkspaceInOrg " ,
178
178
// 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 },
180
180
Resource : rbac .ResourceWorkspace .InOrg (orgID ).WithOwner (currentUser .String ()),
181
181
AuthorizeMap : map [bool ][]authSubject {
182
182
true : {owner , orgMemberMe , orgAdmin , templateAdmin },
183
183
false : {memberMe , otherOrgAdmin , otherOrgMember , userAdmin },
184
184
},
185
185
},
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
+ },
186
196
{
187
197
Name : "MyWorkspaceInOrgExecution" ,
188
198
// When creating the WithID won't be set, but it does not change the result.
0 commit comments