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

feat: add method GetImplicitResourcesForUser #798

Merged
merged 1 commit into from
May 26, 2021
Merged

feat: add method GetImplicitResourcesForUser #798

merged 1 commit into from
May 26, 2021

Conversation

kilosonc
Copy link
Contributor

Signed-off-by: closetool 4closetool3@gmail.com

Fix: #796

@kilosonc
Copy link
Contributor Author

@hsluoyz This method just loop rmMap ,that might not right

for _, rm := range e.rmMap {

@hsluoyz
Copy link
Member

hsluoyz commented May 23, 2021

@closetool we don't need new function. We just need to support g2 in GetImplicitPermissionsForUser().

@kilosonc
Copy link
Contributor Author

@hsluoyz Supporting g2 could not satisfy customer's requirement
casbin/jcasbin#174 (comment)
maybe I'll make a pr later to support g2 in GetPermissionsForUser

@hsluoyz
Copy link
Member

hsluoyz commented May 24, 2021

@closetool rename GetImplicitPoliciesForUser() to GetImplicitResourcesForUser(). Also plz add some tests.

@hsluoyz hsluoyz requested review from uran0sH and sagilio May 24, 2021 09:22
@kilosonc
Copy link
Contributor Author

Fixed @hsluoyz

@hsluoyz
Copy link
Member

hsluoyz commented May 25, 2021

@closetool commit and PR name

@kilosonc kilosonc changed the title feat: add method GetImplicitPoliciesForUser feat: add method GetImplicitResourcesForUser May 25, 2021
rbac_api.go Show resolved Hide resolved
Signed-off-by: closetool <4closetool3@gmail.com>
@kilosonc kilosonc requested a review from uran0sH May 25, 2021 14:57
@hsluoyz
Copy link
Member

hsluoyz commented May 25, 2021

@lanmarti plz review. Although this is Go code, but if it looks OK, we will port it to Java.

rbac_api.go Show resolved Hide resolved
@hsluoyz hsluoyz merged commit fd2dd7f into casbin:master May 26, 2021
@hsluoyz
Copy link
Member

hsluoyz commented May 26, 2021

@closetool plz add the new API to docs.

@github-actions
Copy link

🎉 This PR is included in version 2.31.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

Support also resource grouping (g2) in GetImplicitPermissionsForUser()
4 participants