question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Group with domain model not working

See original GitHub issue

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 ?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:17 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
sagiliocommented, Nov 9, 2021

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.

0reactions
doctormackycommented, Dec 23, 2021

@doctormacky can you review this PR? casbin/casbin#874

@hsluoyz I’d like to do that, but I am not a go master, sorry about this case.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Solve Design Problems With Domain Models - OpenClassrooms
When dealing with big or complex domain models, you'll group elements into separate domains. These are called bounded contexts.
Read more >
GroupBy with after projection to domain model without .ToList()
The problem seems to be the select for documents inside the projection to our domain model. Removing it does the code get work....
Read more >
Chapter 4 – Domain Modeling - Cerritos College
This case description gives information about domain classes and relationships. The students will have to make some assumptions about relationship multiplicity ...
Read more >
Advanced Topic - Domain Modeling - Scaled Agile Framework
Domain Modeling is a way to describe and model real world entities and the relationships between them, which collectively describe the ...
Read more >
Reviewing the Domain Models | Microsoft Learn
Creating a regional domain model design involves identifying what domain is the forest root domain and determining the number of additional ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found