Overview
In this lesson, we are going to create new roles inside the Project and we will discover the relationship between the roles and the menu items that we created under development. Let’s review how this connection works.
How to add Roles on Menu items?
After creating menu items in the previous lesson, we noticed that there is an Admin role created by default and associated to the project. . If we focus on Roles section and click on “Quantity Items” column, a popup is displayed on the screen with all the menu items listed (this popup is similar to the Menu dashboard) with every destination page and conditions/parameters established and the corresponding order in the Project.
...
But what happens if we don’t need every user to see all the menu items and pages related? For this purpose, the app gives the ability to to create new roles.
Click on “Add Roles” under the Menu dashboard.
...
Again, we need to put a role’s description (Name) and the destination’s page for that new role. In the example, we can search by the same page previously linked to our “Wayfast Menu” item. Then click on “Save” button.
...
At this point, we have a new Role but it doesn’t have any assigned Users. To verify that the app is working as expected, we can quickly remove our user from Admin role and reassign to “Wayfast New Role” created.
Click on “Quantity Users” link for Admin and then click “Add User” button
...
A popup is displayed with our username populated. Removing the user and clicking “Accept” button, we are able to setup the user into the new role.
Repeat the steps, click on Quantity Users link (into the “New Role”) and click “Add User” button.
...
If the changes are saved, we can see the updated value in the corresponding role.
After finishing with this settings, we can associate the new role to the menu item. Click on “Quantity Items” link and a popup will display the related menu items. Click “Add items” button and then assign which menu items should be visible for this role.
...
To verify that the role for our user is updated, return to the Project site and refresh the page. After this, we can check that the right assignation is available.
Can users have Multiple Roles?
Today Wayfast is supporting only one role per user registered on the Project. If we add a user that is already assigned to a role the app will check any previous assignation and it will display an error message.
...
Recap
We learnt at project level, how we can create roles and define permissions in terms of development. It’s important to establish from the beginning what roles can see or not what is being created, especially in those cases where the security is complex and there are different departments working on the same application.