(t *testing.T)
| 222 | } |
| 223 | |
| 224 | func TestMatcherUsingInOperatorBracket(t *testing.T) { |
| 225 | e, _ := NewEnforcer("examples/rbac_model_matcher_using_in_op_bracket.conf") |
| 226 | _, _ = e.AddPermissionForUser("alice", "data1", "read") |
| 227 | |
| 228 | testEnforce(t, e, "alice", "data1", "read", true) |
| 229 | testEnforce(t, e, "alice", "data2", "read", true) |
| 230 | testEnforce(t, e, "alice", "data3", "read", true) |
| 231 | testEnforce(t, e, "anyone", "data1", "read", false) |
| 232 | testEnforce(t, e, "anyone", "data2", "read", true) |
| 233 | testEnforce(t, e, "anyone", "data3", "read", true) |
| 234 | } |
| 235 | |
| 236 | func TestReloadPolicy(t *testing.T) { |
| 237 | e, _ := NewEnforcer("examples/rbac_model.conf", "examples/rbac_policy.csv") |
nothing calls this directly
no test coverage detected
searching dependent graphs…