jcasbin: Group with domain model not working

Hi guys, with the latest code chage. you guys change the unit test case directly as following:

Model:

[request_definition]
r = sub, dom, obj, act

[policy_definition]
p = sub, dom, obj, act

[role_definition]
g = _,_
g2 = _, _, _

[policy_effect]
e = some(where (p.eft == allow))

[matchers]
m = (g(r.sub, p.sub) || g2(r.sub, p.sub, r.dom)) && r.obj == p.obj && r.act == p.act

Test case expression:

p, admin, domain1, data1, read
g, alice, group1
g2, group1, admin, domain1

Test case

public void testGroupRoleManager() {
        Enforcer e = new Enforcer("examples/group_with_domain_model.conf", "examples/group_with_domain_policy.csv");
        testDomainEnforce(e, "alice", "domain1", "data1", "read", false);
    }

So, what alice can access ?

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 17 (10 by maintainers)

Most upvoted comments

Group RoleManager has been in the Java/.NET library for a long time (two or three years ago), and I keep this feature always ready.