safrazik / breeze.server.php

Breeze JS support for PHP applications
MIT License
29 stars 11 forks source link

Authorization #22

Closed jasonlfunk closed 8 years ago

jasonlfunk commented 8 years ago

Is there a way to do authorization with this as well? I see that there is data validation, but I don't see any authorization. It seems like the Breeze way is to do 'Save Interception'. Is that supported?

safrazik commented 8 years ago

We believe that authorization is a different concern, and it depends on the application. We solved it in our applications simply by denying access to certain routes for certain user roles. You don't have to depend on the library for this purpose - you shouldn't IMHO. You are not limited to use any of the awesome features provided by Doctrine framework - e.g: lifecycle events. Let's do it the PHP way! P.S: if you have any better suggestion or solution, please comment. We welcome pull requests too :-)

jasonlfunk commented 8 years ago

Lifecycle events on Doctrine should work in my situation. I'll give that a shot. Thanks!