RafaelVidaurre / angular-permission

Simple route authorization via roles/permissions
MIT License
1.13k stars 212 forks source link

$stateChangePermission(Start, Accepted, and Denied) events no longer work with 5.3.x and ui-router 1.x #424

Open xsegrity opened 7 years ago

xsegrity commented 7 years ago

I just upgraded to angular-ui-router 1.x and angular-permission 5.3.x and the $stateChangePermission(Start, Accepted, and Denied) events are no longer being broadcast. Is there a new way to be notified that permissions are being run, accepted, or denied?

masterspambot commented 7 years ago

Along with ui-router depreciation of eventing system the permission was following that policy along. But you have a point in here that I should implement hooks that will replace the missing part. In upcoming version I will drop support for ui-router 0.x and include hooks to monitor these events.

On Wed, 31 May 2017, 01:11 xman, notifications@github.com wrote:

I just upgraded to angular-ui-router 1.x and angular-permission 5.3.x and the $stateChangePermission(Start, Accepted, and Denied) events are no longer being broadcast. Is there a new way to be notified that permissions are being run, accepted, or denied?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Narzerus/angular-permission/issues/424, or mute the thread https://github.com/notifications/unsubscribe-auth/AAjeAXcY0ODusjkj4ujNIsGcqUMUDu3rks5r_KItgaJpZM4Nq9oC .

hdi-amiri commented 7 years ago

@xsegrity I want to point that upgrading to new ui-router is very simple, they have implemented a polyfill for $stateChange family thing that lets you migrate your app without breaking anything.

Eduardo-Julio commented 6 years ago

There is no work around for this? Its impossible for me to use ui-router 1+ without that events (or a hook to replace the events). Im trying to make it work and I cant, do you have any quick fix? thanks.

front-stream commented 6 years ago

+1