(t *testing.T)
| 687 | } |
| 688 | |
| 689 | func TestGetImplicitUsersForResourceByDomain(t *testing.T) { |
| 690 | e, _ := NewEnforcer("examples/rbac_with_domains_model.conf", "examples/rbac_with_domains_policy.csv") |
| 691 | testGetImplicitUsersForResourceByDomain(t, e, [][]string{{"alice", "domain1", "data1", "read"}, |
| 692 | {"alice", "domain1", "data1", "write"}}, "data1", "domain1") |
| 693 | |
| 694 | testGetImplicitUsersForResourceByDomain(t, e, [][]string{}, "data2", "domain1") |
| 695 | |
| 696 | testGetImplicitUsersForResourceByDomain(t, e, [][]string{{"bob", "domain2", "data2", "read"}, |
| 697 | {"bob", "domain2", "data2", "write"}}, "data2", "domain2") |
| 698 | } |
| 699 | |
| 700 | func TestConditional(t *testing.T) { |
| 701 | e, _ := NewEnforcer("examples/rbac_with_domains_conditional_model.conf", "examples/rbac_with_domains_conditional_policy.csv") |
nothing calls this directly
no test coverage detected