ZF-Commons / zfc-rbac

Role-based access control module to provide additional features on top of Zend\Permissions\Rbac
BSD 3-Clause "New" or "Revised" License
181 stars 111 forks source link

Maybe we could have PermissionProvider? #386

Closed svycka closed 5 years ago

svycka commented 6 years ago

this https://github.com/ZF-Commons/zfc-rbac/blob/develop/src/Role/RoleInterface.php#L33 method with doctrine a bit hard to use I have to add identity entity with roles many to many associations then add role with many to many for permissions and even then have to convert permission entities to string because now we no longer support PermissionInterface that's not so good for performance and also hard to cache. Permissions do not change often because if I add a new permission that's probably because of a new feature.

So I would like to get roles from the repository but permissions from config or something like memory provider. Is this good idea? Maybe someone has a better suggestion?