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

Function TestSubjectPriority

enforcer_test.go:512–520  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

510}
511
512func TestSubjectPriority(t *testing.T) {
513 e, _ := NewEnforcer("examples/subject_priority_model.conf", "examples/subject_priority_policy.csv")
514 testBatchEnforce(t, e, [][]interface{}{
515 {"jane", "data1", "read"},
516 {"alice", "data1", "read"},
517 }, []bool{
518 true, true,
519 })
520}
521
522func TestSubjectPriorityWithDomain(t *testing.T) {
523 e, _ := NewEnforcer("examples/subject_priority_model_with_domain.conf", "examples/subject_priority_policy_with_domain.csv")

Callers

nothing calls this directly

Calls 2

NewEnforcerFunction · 0.85
testBatchEnforceFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…