Hi Sander,

thanks for checking this and for your answers.

I think a good use case would look like this:

- Providing metadata for components to state that they can be accessed by 
unauthenticated users, something like @Auth({anonymous:true})
- Using event to prevent unauthenticated users to access components without 
this directive or with @Auth({anonymous:false})

Wishes,
Manfred

p. s.: Of course, the real security-checks have to be performed on 
server-side

Am Dienstag, 22. Dezember 2015 15:56:17 UTC+1 schrieb Sander Elias:
>
> Hi Martin,
>
> No, you shouldn't need to inject it everywhere. Usually there is no need 
> for that. If you make sure that at  a higher-level component the check is 
> done. 
> See, for the router your app has a tree-like structure. You can put an 
> can(de)activate on every branch, and/or even at the base. everything above 
> that point, can only be reached when the condition is satisfied. 
>
> Can you provide a use-case that really demands a global handler? 
>
> Regards
> Sander
>

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to