(t *testing.T)
| 209 | } |
| 210 | |
| 211 | func TestMatcherUsingInOperator(t *testing.T) { |
| 212 | // From file config |
| 213 | e, _ := NewEnforcer("examples/rbac_model_matcher_using_in_op.conf") |
| 214 | _, _ = e.AddPermissionForUser("alice", "data1", "read") |
| 215 | |
| 216 | testEnforce(t, e, "alice", "data1", "read", true) |
| 217 | testEnforce(t, e, "alice", "data2", "read", true) |
| 218 | testEnforce(t, e, "alice", "data3", "read", true) |
| 219 | testEnforce(t, e, "anyone", "data1", "read", false) |
| 220 | testEnforce(t, e, "anyone", "data2", "read", true) |
| 221 | testEnforce(t, e, "anyone", "data3", "read", true) |
| 222 | } |
| 223 | |
| 224 | func TestMatcherUsingInOperatorBracket(t *testing.T) { |
| 225 | e, _ := NewEnforcer("examples/rbac_model_matcher_using_in_op_bracket.conf") |
nothing calls this directly
no test coverage detected
searching dependent graphs…