casbin / gorm-adapter

GORM adapter for Casbin, see extended version of GORM Adapter Ex at: https://github.com/casbin/gorm-adapter-ex
https://github.com/casbin/casbin
Apache License 2.0
692 stars 207 forks source link

feat: New method for creating filtered adapter with existing gorm instance #188

Closed gurbaj5124871 closed 2 years ago

gurbaj5124871 commented 2 years ago

Why

We use casbin filtered adapter on closured level i.e new adapter created on every request instead on global level so that only relevant policies are loaded on every request. But creating a new gorm connection on every request would be not optimised. Hence wanted to expose a new filtered adapter which accepts existing gorm instance.

casbin-bot commented 2 years ago

@tangyang9464 @JalinWang @imp2002 please review

CLAassistant commented 2 years ago

CLA assistant check
All committers have signed the CLA.

gurbaj5124871 commented 2 years ago

@pckhoi @huazhikui bumping up to see any input on this pr

github-actions[bot] commented 2 years ago

:tada: This PR is included in version 3.13.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: