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

Remove permission #309

Closed bakura10 closed 9 years ago

bakura10 commented 9 years ago

This PR updates dependency to new RBAC (in development).

It also completely removes the PermissionInterface. The only requirement is that the permission given to AuthorizationService is or can be casted to string.

Actually I think you're right @danizord . We could enforce permission as string, as the parameter bag could be added as part of the context, actually.

bakura10 commented 9 years ago

What do you think of actually also passing the context to the actual "hasPermission" method of the role?

bakura10 commented 9 years ago

Or maybe embracing the concept explained here: https://github.com/ZF-Commons/zfc-rbac/issues/240

Rbac (not ZfcRbac) would add a new "AuthorizationContextInterface" instead of requiring a string permission?