Skip to content
Prev Previous commit
Next Next commit
Add CryptoKeys to RBAC role permissions test
  • Loading branch information
sreya committed Sep 15, 2024
commit 7662b6724e18d6b85e6f4f4085eecc07ddb692d0
9 changes: 9 additions & 0 deletions coderd/rbac/roles_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -705,6 +705,15 @@ func TestRolePermissions(t *testing.T) {
},
},
},
{
Name: "CryptoKeys",
Actions: []policy.Action{policy.ActionCreate, policy.ActionUpdate, policy.ActionDelete, policy.ActionRead},
Resource: rbac.ResourceCryptoKey,
AuthorizeMap: map[bool][]hasAuthSubjects{
true: {owner},
false: {setOtherOrg, setOrgNotMe, memberMe, orgMemberMe, templateAdmin, userAdmin},
},
},
}

// We expect every permission to be tested above.
Expand Down
Loading