Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

« Previous Version 3 Next »

Overview

Now that we started a Project in Wayfast, you can set different Menu and Sub-Menu items and assign the pages associated to each of them. Apart from that, we will learn how the tool gives the ability to provide Roles and Permissions for every Menu Item created. This functionality offers the chance to establish our own Security Matrix for each user who logins and work on the Project.

Menu Items  

Preconditions

First, we need to create a Project and build the structure with DB and active Requirements. For more information you can visit the “Hello World” document.

How to create new Menu items?

Under the Project top header, clicks on “General Options” icon. Then turns into “Menu” tab

“Menu” dashboard displays all the Menu items and Roles that currently are created for this Project.

NOTE: We will focus on “Custom Roles” functionality as part of another doc.

Creating a menu is easy, click on “Add items” button. A popup “Create a new menu items” is displayed with the mandatory information. Primary we need to set the “Description” and more important, our “Destination” field. This lookup field will retrieve all the pages created in our Project. A menu needs to be associated to any page, otherwise, the Menu will be empty and won’t redirect to any place. Finally we can set the “Order” field to view this menu item. In the example, our Project already has a “Menu 1” and “Menu 2” with their respective order, so we can set “Order = 3” for the new item.

“Destination” search will display all the pages according to the Page’s name and ID. Once we set all the required field, click “Accept” button and we can observe the new menu item under the dashboard. If the user wants to edit the menu item, we need to click on the “Menu’s name” link.

NOTE: User can remove the new menu item by clicking on “Cross” red icon under the “Delete” column.

User can access to the Project site as another way to verify if the Menu recently created is saved. Changes will be immediately impacted, we can clean the cache in browser if the menu is not visible.

How to add Roles and Permissions on Menu items?

Now that we have the menu item created and displayed in the Project, by default the Role associated is ADMIN. If user focuses on Roles section and clicks 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 by the creator and the corresponding order in the Project.

But what happens if don’t need every user to see all the menu items and pages related? On this topic, we will learn how to create new roles. To start 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 “Menu 3” item. Then click on “Save” button.

At this point, we have a new Role but don’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 “New Role” newly created. Clicks on “Quantity Users” link for Admin.

A pop up with our user linked is displayed. By 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 (related to “New Role”) and “Add User” button.

Once the user is registered, we can see it available for “New Role” row.

A final step is needed, associate the new role to menu items. For this purpose, click on “Quantity Items” link and a popup will display the related menu items. Click “Add items” 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 (sometimes it will need to clean browser’s cache). After this, we can check that the right assignation is available.

Can user have Multiple Roles?

Actually 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

In the first part, we learnt about how to create new Menu items and how they can contain Pages previously created. We defined the relationship in General Options. In the second part, we created Roles and how they can be assigned to the listed users and menu items and finally we navigated briefly through the Project site to verify that the new changes are applied on the fly. In next tutorials, we can learn how Wayfast allows us the possibility to establish multiple conditions and parameters that make this parent-child logic more complex and accurate to our system’s needs.


  • No labels