Skip to content

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

Open
KenFujimoto12 wants to merge 1 commit intodevelopfrom
feat/fix-casbin-update
Open

Fix: "Get Roles Method" return roles order correctly#847
KenFujimoto12 wants to merge 1 commit intodevelopfrom
feat/fix-casbin-update

Conversation

@KenFujimoto12
Copy link
Copy Markdown
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