JavadRasouli / ng2-permission

permission based access control for your angular2 applications.
MIT License
53 stars 19 forks source link

Can I access the permission on AuthGuardService to validate it in API? #2

Open felipefialho opened 7 years ago

felipefialho commented 7 years ago

For example

canActivate(
    route: ActivatedRouteSnapshot, 
    state: RouterStateSnapshot): Observable<boolean> | boolean { 
      this.permissionService.store; // Get the permission of view on AppRoutingModule
  }

Is it possible @JavadRasouli?

JavadRasouli commented 7 years ago

Do you want call a function when executing canActivate ? If yes, this is not possible at this time. But this will be possible soon enough.