zf-fr / rbac

Zend Framework 3 prototype for the Zend\Permissions\Rbac component
27 stars 14 forks source link

Simplify permission interface #1

Closed bakura10 closed 10 years ago

bakura10 commented 10 years ago

ping @arekkas @spiffyjr @danizord

I need your feedback on this. I'm actually thinking about reducing the interface of Permission so that we don't need to implement the getRoles. The idea is to remove the need of maintaining bi-directional association (which simplify a lot in Doctrine).

I can't really find a case where you would like to traverse the permission from the permission to the roles.

danizord commented 10 years ago

:+1:

danizord commented 10 years ago

This interface is really needed? Since Rbac needs a string, I think you can accept only string and move this interface/casting to ZfcRbac. What do you think?

bakura10 commented 10 years ago

Mmmhhh I think it makes sense. It's actually useful to have an interface for that. This allow the rbac to work with any implementation. I still want to keep some lines of code in the rbac component :D

Envoyé de mon iPhone

Le 14 déc. 2013 à 20:24, Daniel Gimenes notifications@github.com a écrit :

This interface is really needed? Since Rbac needs a string, I think you can accept only string and move this interface/casting to ZfcRbac. What do you think?

— Reply to this email directly or view it on GitHub.

bakura10 commented 10 years ago

I merge as I need that for ZfcRbac. If you have something to say about it, please do it ;-).

aeneasr commented 10 years ago

Kinda late, but :+1: