Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat: fix different ways of building role links when domain patterns are enabled #352

Merged
merged 2 commits into from
Apr 27, 2024

Conversation

imf-code
Copy link
Contributor

@imf-code imf-code commented Apr 24, 2024

Attempt at addressing #351

Effectively causes each role in each domain to be considered their own role.
That is:

g, role1, base-role, dom/*
g, alice, role1, dom/1

Should result in following link chain: alice in dom/1 -> role1 in dom/1 -> role1 in dom/* -> base-role in dom/*
This could lead to maximum hierarchy being reached faster then expected in some cases.

Performance and concurrency has been considered but not really tested.

Fix: #351

@casbin-bot
Copy link
Member

@sagilio please review

@CLAassistant
Copy link

CLAassistant commented Apr 24, 2024

CLA assistant check
All committers have signed the CLA.

@imf-code imf-code changed the title Different way of building role links when domain patterns are enabled. fix: Different way of building role links when domain patterns are enabled. Apr 25, 2024
@hsluoyz
Copy link
Member

hsluoyz commented Apr 27, 2024

@imf-code plz fix CI errors:

image

@hsluoyz hsluoyz changed the title fix: Different way of building role links when domain patterns are enabled. feat: fix different ways of building role links when domain patterns are enabled Apr 27, 2024
@hsluoyz hsluoyz merged commit 5a358a4 into casbin:master Apr 27, 2024
7 checks passed
Copy link

🎉 This PR is included in version 2.7.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Using RBAC w/ Domain pattern matching can lead to unexpected results
4 participants