MCPcopy Index your code
hub / github.com/apache/casbin / testGetImplicitUsersForRole

Function testGetImplicitUsersForRole

rbac_api_test.go:482–492  ·  view source on GitHub ↗
(t *testing.T, e *Enforcer, name string, res []string)

Source from the content-addressed store, hash-verified

480}
481
482func testGetImplicitUsersForRole(t *testing.T, e *Enforcer, name string, res []string) {
483 t.Helper()
484 myRes, _ := e.GetImplicitUsersForRole(name)
485 t.Log("Implicit users for ", name, ": ", myRes)
486 sort.Strings(res)
487 sort.Strings(myRes)
488
489 if !util.SetEquals(res, myRes) {
490 t.Error("Implicit users for ", name, ": ", myRes, ", supposed to be ", res)
491 }
492}
493
494func TestExplicitPriorityModify(t *testing.T) {
495 e, _ := NewEnforcer("examples/priority_model_explicit.conf", "examples/priority_policy_explicit.csv")

Callers 1

TestImplicitUsersForRoleFunction · 0.85

Calls 4

SetEqualsFunction · 0.92
StringsMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…