(t *testing.T)
| 166 | } |
| 167 | |
| 168 | func TestRBACModelWithDomains(t *testing.T) { |
| 169 | e, _ := NewEnforcer("examples/rbac_with_domains_model.conf", "examples/rbac_with_domains_policy.csv") |
| 170 | |
| 171 | testDomainEnforce(t, e, "alice", "domain1", "data1", "read", true) |
| 172 | testDomainEnforce(t, e, "alice", "domain1", "data1", "write", true) |
| 173 | testDomainEnforce(t, e, "alice", "domain1", "data2", "read", false) |
| 174 | testDomainEnforce(t, e, "alice", "domain1", "data2", "write", false) |
| 175 | testDomainEnforce(t, e, "bob", "domain2", "data1", "read", false) |
| 176 | testDomainEnforce(t, e, "bob", "domain2", "data1", "write", false) |
| 177 | testDomainEnforce(t, e, "bob", "domain2", "data2", "read", true) |
| 178 | testDomainEnforce(t, e, "bob", "domain2", "data2", "write", true) |
| 179 | } |
| 180 | |
| 181 | func TestRBACModelWithDomainsAtRuntime(t *testing.T) { |
| 182 | e, _ := NewEnforcer("examples/rbac_with_domains_model.conf") |
nothing calls this directly
no test coverage detected
searching dependent graphs…