I'd like to decline access to routes based on the rights the user has. So i have a table inside my mongoDb with the userRights and two simple guards actually. One for logged in Users and one for Administrators.
So now i would like to give the user the right to visit a specific route. Therefore i'd like to add my canActivate: [checkForRightGuard]
which gets parsed in the right so check but how would i do that?
I thought about this solution because i don't think that i have to create a guard for every right that i have to check - or?
So i though about sth. like this (of course, this is not working, but i think it shows what i need)
{path: 'admin/expandSoftware', component: ExpandSoftwareComponent, canActivate: [AdminGuard('canExpandSoftware')]},