Permissions at router level

28 days ago

Bill Lions
Member | 46

After reading through…cess-control, authorization is performed in a presenter.

if( isAllowed(...){...

Is it possible to check permission on a route?
Eg: isAllowed(), or maybe hasPermission() would check if a user has permission to access a given route.
In this way, the presenter would never be loaded.

27 days ago

David Matějka
Moderator | 6202

Hi, it could be possible bt I wouldn't recommend it. IMHO it is far more easier to overlook something.
E.g. when you create a catch all route (like the one in webproject) then all presenters will be accessible no matter what.

26 days ago

Backer | 94

I would just add that it's not Router concern to deal with user permissions.