MCPcopy
hub / github.com/apache/casbin / testGetImplicitPermissions

Function testGetImplicitPermissions

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

Source from the content-addressed store, hash-verified

327}
328
329func testGetImplicitPermissions(t *testing.T, e *Enforcer, name string, res [][]string, domain ...string) {
330 t.Helper()
331 myRes, _ := e.GetImplicitPermissionsForUser(name, domain...)
332 t.Log("Implicit permissions for ", name, ": ", myRes)
333
334 if !util.Set2DEquals(res, myRes) {
335 t.Error("Implicit permissions for ", name, ": ", myRes, ", supposed to be ", res)
336 }
337}
338
339func testGetImplicitPermissionsWithDomain(t *testing.T, e *Enforcer, name string, domain string, res [][]string) {
340 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…