Open achmadafriza opened 1 year ago
There's a simple fix which just changes /gofiber/casbin.Config.Enforcer
type from casbin.*Enforcer
to casbin.IEnforcer
. However this does not take into account the behavior of DistributedEnforcer
, which have another interface casbin.IDistributedEnforcer
.
I could submit a PR for it later.
Feature Description
Currently, Casbin supports multiple types of
Enforcer
:Enforcer
SyncedEnforcer
CachedEnforcer
SyncedCachedEnforcer
DistributedEnforcer
This doesn't deviate from the core functionalities of the
Enforcer
, which is described in the interfaceIEnforcer
. The types of enforcers acts as a decorator to the actual Enforcer. As such, users should be able to use the middleware with other types of Enforcer.Additional Context (optional)
No response
Code Snippet (optional)
Checklist: