Skip to content

Commit 7662b67

Browse files
committed
Add CryptoKeys to RBAC role permissions test
1 parent 28b7551 commit 7662b67

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

coderd/rbac/roles_test.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -705,6 +705,15 @@ func TestRolePermissions(t *testing.T) {
705705
},
706706
},
707707
},
708+
{
709+
Name: "CryptoKeys",
710+
Actions: []policy.Action{policy.ActionCreate, policy.ActionUpdate, policy.ActionDelete, policy.ActionRead},
711+
Resource: rbac.ResourceCryptoKey,
712+
AuthorizeMap: map[bool][]hasAuthSubjects{
713+
true: {owner},
714+
false: {setOtherOrg, setOrgNotMe, memberMe, orgMemberMe, templateAdmin, userAdmin},
715+
},
716+
},
708717
}
709718

710719
// We expect every permission to be tested above.

0 commit comments

Comments
 (0)