You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In our frontend application we have two use cases that request for Route Gard implementation:
Ask user to save data when moving away from component when there are still uncommitted changes
Allow access to components based on Role based access constraint that come from Ampersand compiler
There are five different types of Route Guards:
CanActivate
CanActivateChild
CanLoad
CanDeactivate (can be used to prevent navigating away)
Resolve
Note that a Route Guard can be applied to a route itself using the canActivate property and/or be applied to all child routes using the canActiveChild property.
This feature requires the implementation of keeping track of sessionRoles in the frontend. I'll create a separate issue for that.
EDIT:
It is not necessary for the sessionRoles to be tracked in the front-end, since this has already been handled by the back-end.
To complete this Epic, there are two issues that have to be resolved. One involves routing based on the roles of the user AmpersandTarski/prototype-frontend#177, and the other involves the user going to another route when the changes have yet to be commited #136 .
@Michiel-s perhaps it's better to split this into multiple issues? For the "Ask user to save data when moving away from component when there are still uncommitted changes" part, I'm guessing that's for when the patches don't immediately get called, right? Cause that's also not possible yet in our current application.
LiWeiYeh
changed the title
Add Angular Route Guards to manage navigation in app
Epic: Add Angular Route Guards to manage navigation in app
Feb 21, 2023
Yes. This issue is still relevant. The developed RolesGuard is not activated for generated module and also the pending changes detection is open issue.
In our frontend application we have two use cases that request for Route Gard implementation:
Role
based access constraint that come from Ampersand compilerThere are five different types of Route Guards:
Note that a Route Guard can be applied to a route itself using the
canActivate
property and/or be applied to all child routes using thecanActiveChild
property.This feature requires the implementation of keeping track of
sessionRoles
in the frontend. I'll create a separate issue for that.EDIT:
It is not necessary for the sessionRoles to be tracked in the front-end, since this has already been handled by the back-end.
To complete this Epic, there are two issues that have to be resolved. One involves routing based on the roles of the user AmpersandTarski/prototype-frontend#177, and the other involves the user going to another route when the changes have yet to be commited #136 .
The text was updated successfully, but these errors were encountered: