I'm using Booleans and a userRights.service for checking whether a nav-point is shown or hidden. So therefore i'd like to check the rights from the user who's logging in, and than set the variables for the navigation to true or false.
I have two components for that: My navbar.component.ts and my login.component.ts. Inside my navbar.component.ts are Booleans (15) like this ->
canAddHardware
canChangeUserRights
canEditBlog
...
So now the user logs in, inside my login.component.ts and the onLogin() function gets triggerd. I'm calling my userRights.service.userHasRight('canAddHardware') for example, and than i need the Boolean inside my navbar.component.ts to be the value which gets returned from my userRights.service.userHasRight('canAddHardware') -> true or false
I tried so many things but i'm not able to figure out how to do this.