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

Function testGetImplicitPermissionsWithDomain

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

Source from the content-addressed store, hash-verified

337}
338
339func testGetImplicitPermissionsWithDomain(t *testing.T, e *Enforcer, name string, domain string, res [][]string) {
340 t.Helper()
341 myRes, _ := e.GetImplicitPermissionsForUser(name, domain)
342 t.Log("Implicit permissions for", name, "under", domain, ":", myRes)
343
344 if !util.Set2DEquals(res, myRes) {
345 t.Error("Implicit permissions for", name, "under", domain, ":", myRes, ", supposed to be ", res)
346 }
347}
348
349func testGetNamedImplicitPermissions(t *testing.T, e *Enforcer, ptype string, gtype string, name string, res [][]string) {
350 t.Helper()

Callers 1

Calls 3

Set2DEqualsFunction · 0.92
ErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…