question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

event $routeChangePermissionAccepted is executed but the route is not redirected

See original GitHub issue

Hi,

The event $routeChangePermissionAccepted is fired but the nextRoute is not opened.

The permission check function defined below in is being called and returns true. The permissions array it’s filled with all permissions of the logged user.

PermissionStore.defineManyPermissions(permissions, function (permName) {
        var hasPerm = permissions.indexOf(permName) > -1;
        console.log("HasPerm, " + permName + ": ", hasPerm);
        return hasPerm;
});

Is there some step I’m missing?

Thanks.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5

github_iconTop GitHub Comments

2reactions
masterspambotcommented, Jun 21, 2016

The issue was more complex than I initially thought. But I managed to implement custom resolver that was needed in order to properly handle async calls inside ngRoute. Resolved in v3.1.7.

0reactions
clebertmouracommented, Jun 21, 2016

Thanks @masterspambot . I’ve tested the release v3.1.7 and it is working fine!

Read more comments on GitHub >

github_iconTop Results From Across the Web

event $routeChangePermissionAccepted is executed but the ...
As a workaround, I downgraded to version 3.1.5 and implemented a listener to the event $routeChangePermissionDenied, to redirect to a, access ...
Read more >
vue-router — Uncaught (in promise) Error: Redirected from ...
push("/"); row - it trying to say you that pushing to home was interrupted by redirection in navigation guard. But actually, it's not...
Read more >
Listening on Route Changes to Implement a Login Mechanism
Implement a listener on the $routeChangeStart event to track the next route navigation. Redirect to a login page if the user is not...
Read more >
Stop using client-side route redirects - Kent C. Dodds
As for using <Redirect /> when it is within your own app, the user will have to wait until the app finishes loading...
Read more >
Event Dispatcher and redirects | Drupal 9 Module Development
A common thing you'll have to do as a module developer is to intercept a given request and redirect it to another page,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found