MCPcopy Index your code
hub / github.com/coder/coder / randomRBACType

Function randomRBACType

coderd/coderdtest/authorize.go:450–468  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

448}
449
450func randomRBACType() string {
451 all := []string{
452 rbac.ResourceWorkspace.Type,
453 rbac.ResourceAuditLog.Type,
454 rbac.ResourceConnectionLog.Type,
455 rbac.ResourceTemplate.Type,
456 rbac.ResourceGroup.Type,
457 rbac.ResourceFile.Type,
458 rbac.ResourceProvisionerDaemon.Type,
459 rbac.ResourceOrganization.Type,
460 rbac.ResourceUser.Type,
461 rbac.ResourceOrganizationMember.Type,
462 rbac.ResourceWildcard.Type,
463 rbac.ResourceLicense.Type,
464 rbac.ResourceReplicas.Type,
465 rbac.ResourceDebugInfo.Type,
466 }
467 return all[must(cryptorand.Intn(len(all)))]
468}
469
470func RandomRBACSubject() rbac.Subject {
471 return rbac.Subject{

Callers 1

RandomRBACObjectFunction · 0.85

Calls 2

IntnFunction · 0.92
mustFunction · 0.70

Tested by

no test coverage detected