Skip to content
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 to delete role in domain #1361

Closed
Chaunceyan opened this issue Feb 21, 2024 · 2 comments
Closed

[Question] How to delete role in domain #1361

Chaunceyan opened this issue Feb 21, 2024 · 2 comments

Comments

@Chaunceyan
Copy link

Want to prioritize this issue? Try:

issuehunt-to-marktext


What's your scenario? What do you want to achieve?
I am using RBAC with Domain. I have roles with the same name in different domains, e.g. role::admin in domain app1, and role::admin in domain app2. How am I supposed to only delete a role::admin in app1 without effecting role::admin in app2?

My mode:

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

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

[role_definition]
g = _, _, _

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

[matchers]
m = (g(r.sub, p.sub, r.dom) || r.sub == p.sub) && r.dom == p.dom && keyMatch(r.obj, p.obj) && keyMatch(r.act, p.act) || r.dom == p.dom && r.sub == "role::admin"
@casbin-bot
Copy link
Member

@tangyang9464 @JalinWang

@Chaunceyan
Copy link
Author

I just realized "RemoveFiltered*" APIs solve the problem. Issue closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants