Skip to content

fix: GetPermissionsForUser panics on empty list of domains#800

Merged
hsluoyz merged 1 commit intoapache:masterfrom
kilosonc:domain
May 24, 2021
Merged

fix: GetPermissionsForUser panics on empty list of domains#800
hsluoyz merged 1 commit intoapache:masterfrom
kilosonc:domain

Conversation

@kilosonc
Copy link
Contributor

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

Fix: #799

@hsluoyz
Copy link
Member

hsluoyz commented May 22, 2021

@Gilthoniel plz review.

@hsluoyz hsluoyz requested a review from sagilio May 23, 2021 12:03
@hsluoyz
Copy link
Member

hsluoyz commented May 23, 2021

@sagilio plz review.

Copy link
Contributor

@sagilio sagilio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Signed-off-by: closetool <4closetool3@gmail.com>
@kilosonc
Copy link
Contributor Author

I think we can use the existing API to get the domain index.
https://github.com/casbin/casbin/blob/beedee2c0f86039b927863a4e9931e91421456a3/internal_api.go#L364

@sagilio fixed

@hsluoyz hsluoyz merged commit 5cbd8cd into apache:master May 24, 2021
@github-actions
Copy link

🎉 This PR is included in version 2.30.5 🎉

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.

GetPermissionsForUser panics on empty list of domains

3 participants