Answer the question
In order to leave comments, you need to log in
Distribution of access rights. How to display only the desired functionality?
Good day dear EmberJS gurus.
The essence of the problem:
There is a certain system, suppose a store, in which there are 3 actors:
Answer the question
In order to leave comments, you need to log in
Hello.
The easiest way:
1. Add a role or roles to the session object (or authorized user profile). These can be bitmasks or just a string (like 'admin').
2. Forward this object through DI to the route, controller and components.
3. In the route, check the rights and redirect if there is no access to this section, for example, this is the admin section.
4. In the templates, you check for the role, and output the appropriate interface.
It will be useful to make a sign of rights somewhere in the configs and look at it when checking rights.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question