I want to build the interface based on user’s permissions. User’s have a role id in backend, let’s say admin=0, writer=1, reader=2. For example on a page where are articles writers should see a button ‘create new article’ but the readers are not allowed to that feature. How can I achive this?
My idea is that i check in an ngIf the role id is equal or lower than 1, but I hope that there is a “better” way to achieve this.
I will apreciate any kind of help.