casbin / casbin-rs

An authorization library that supports access control models like ACL, RBAC, ABAC in Rust.
https://casbin.org
Apache License 2.0
828 stars 67 forks source link

Enforcer shouldn't load full policy when loading a filtered adapter #304

Closed prabirshrestha closed 9 months ago

prabirshrestha commented 1 year ago

Golang version of Enforcer doesn't load full policy if the adapter is filtered. https://github.com/casbin/casbin/blob/63b2757cc60362d974921cb9065809b617d8b527/enforcer.go#L176-L183.

Would be good if casbin-rs also follows similar pattern as loading policies from database could be huge.

https://github.com/casbin/casbin-rs/blob/9320add836f2c66204c082e4b4ecf3b4f79fc015/src/enforcer.rs#L265

casbin-bot commented 1 year ago

@hackerchai @PsiACE

prabirshrestha commented 9 months ago

Noticed this is marked as completed. Curious if we can have a new version released to crates.io

hsluoyz commented 9 months ago

@prabirshrestha use latest v2.1.0: https://github.com/casbin/casbin-rs/releases/tag/v2.1.0