-
-
Notifications
You must be signed in to change notification settings - Fork 203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[QUESTION] - How Would I make queries for different scenarios #108
Comments
@sujit-baniya plz use: https://casbin.org/docs/en/rbac-with-domains It's not a gorm-adapter issue I think. |
@hsluoyz Thanks for your response. I added the extra matcher parameter but still I don't see any effect. Need to check more. [request_definition]
r = sub, dom, obj, act
[policy_definition]
p = sub, dom, obj, act
[role_definition]
g = _, _, _
[policy_effect]
e = some(where (p.eft == allow))
[matchers]
m = g(r.sub, p.sub, r.dom) && r.dom == p.dom && r.obj == p.obj && r.act == p.act || r.sub == root |
@hsluoyz Thanks again :). I tried and now I could get all Domains associated with the Admin account using following Model. [request_definition]
r = sub, dom, obj, act
[policy_definition]
p = sub, dom, obj, act
[role_definition]
g = _, _, _
[policy_effect]
e = some(where (p.eft == allow))
[matchers]
m = g(r.sub, p.sub, r.dom) && keyMatch2(r.dom, p.dom) && r.obj == p.obj && r.act == p.act Still casbin is not providing any API for getting all users for a Domain. Creating one issue on Casbin. |
@hsluoyz Here, casbin/casbin#782 |
Also can you please suggest which storage would be best for high performance: CSV vs POstgres |
@sujit-baniya DB adapter is better for production use. Closed here. |
I've been using this adapter on Postgres. Curently I'm stuck on getting some information from Casbin. Please help me understand how could I query to get those information.
I'm trying to look for
*
, get all users associated to all domains with their respective rolesSo I have basically added three roles: admin, account-admin, and user
admin => with all powers
account-admin => with all powers for account (domain)
user => normal users
And Admin would see all users irrespective of domains, Account Admin would see all users associated with the domain.
Currently I needed to make custom queries to fetch such information. Any help would be highly appreciated.
The text was updated successfully, but these errors were encountered: