I think the best way to integrate IEnforcer (rbac api) and ManagementEnforcer (management api) to a one IEnforcer is use Extension Method to implement it. Here are some reasons:
- IEnforcer can be a simple and clean interface.
- We can maintain the RBAC and Management API at different class, and we can easy to add new helper type API.
- Follow the CARP desgin.
It will become a break change, we should change the protect field to Read-only property (also GetModel method can do it) and delete the InternalEnforcer, ManagementEnforcer and CoreEnforcer and convert them to a Enforcer class which only includes the API in InternalEnforcer and CoreEnforcer in now version).
Relate comment:
#55 (comment)
I think the best way to integrate IEnforcer (rbac api) and ManagementEnforcer (management api) to a one IEnforcer is use
Extension Methodto implement it. Here are some reasons:It will become a break change, we should change the protect field to Read-only property (also GetModel method can do it) and delete the
InternalEnforcer,ManagementEnforcerandCoreEnforcerand convert them to a Enforcer class which only includes the API inInternalEnforcerandCoreEnforcerin now version).Relate comment:
#55 (comment)