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

Function RandomRBACObject

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

Source from the content-addressed store, hash-verified

433}
434
435func RandomRBACObject() rbac.Object {
436 return rbac.Object{
437 ID: uuid.NewString(),
438 Owner: uuid.NewString(),
439 OrgID: uuid.NewString(),
440 Type: randomRBACType(),
441 ACLUserList: map[string][]policy.Action{
442 namesgenerator.UniqueName(): {RandomRBACAction()},
443 },
444 ACLGroupList: map[string][]policy.Action{
445 namesgenerator.UniqueName(): {RandomRBACAction()},
446 },
447 }
448}
449
450func randomRBACType() string {
451 all := []string{

Callers 5

TestAuthzRecorderFunction · 0.92
fuzzAuthzPrepFunction · 0.92
fuzzAuthzFunction · 0.92
BenchmarkCacherFunction · 0.92
TestCacheFunction · 0.92

Calls 3

UniqueNameFunction · 0.92
randomRBACTypeFunction · 0.85
RandomRBACActionFunction · 0.85

Tested by 5

TestAuthzRecorderFunction · 0.74
fuzzAuthzPrepFunction · 0.74
fuzzAuthzFunction · 0.74
BenchmarkCacherFunction · 0.74
TestCacheFunction · 0.74