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

Fix: "Get Roles Method" return roles order correctly #847

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

KenFujimoto12
Copy link
Contributor

@KenFujimoto12 KenFujimoto12 commented Nov 19, 2024

casbin RBAC Apiで、返り値のarrayが順序を担保しないため、sortをかけます。
https://github.com/casbin/casbin/blob/bf330b3f9e4498561890da0ff854cf9e8bf6de5e/rbac_api.go#L27

具体的には以下のmapsの反復処理が順序保証されないために起こるようです。
https://github.com/casbin/casbin/blob/bf330b3f9e4498561890da0ff854cf9e8bf6de5e/rbac/default-role-manager/role_manager.go#L151C16-L151C24

また、mongo-driverのバージョンもアップグレードしています。

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

Successfully merging this pull request may close these issues.

1 participant