Many applications have roles for Customers, Sales Reps, and more, but can benefit from an “Admin” role as well.
This role is different than a shared builder in the Knack builder - this is an Admin user role designed to allow access to all records through the live application.
For example, as the Admin you will need access to Leads, Orders, Sales Reps, and other records in the database.
This article will show you how to build a page in your live application in which an Admin user can login and view all of the records in your app.
You will need to have user logins enabled to allow for multiple user roles.
Knack Tip: Read more about security settings available with user logins to help ensure the security of your Live App pages.
Add a User Role for Admin
Click “add” next to User Roles:
Name the role Admin:
Click the Records tab for the newly created Admin role and click “add record” to add a new admin user:
Create a Login Page for Admin
In the pages tab, add a new page:
Add a login page for the Admin:
Choose an object such as Leads, you can add more records to the page later:
Choose options for the view:
Name and add the new page:
Add Views to the Page
Once the page is added, you can select the menu view, and add links to additional records:
Choose the objects you want to add to the menu:
For this example, we are adding a link to view all the Orders:
Repeat as needed to add more menu items.
Manage Users From Admin Page
One advantage to building an Admin page is that you can also manage your users instead of having to go into the builder.
To manage users you will need to add a view for your user records. For this example we will demonstrate how to add Sales Rep users.
Click your menu view to add a new link to the menu:
Choose the “add link to new page” like we did in previous steps. When choosing the object in the stp that follows, make sure to choose the Sales Rep user role:
Add the view options for both the menu to add new Sales Reps and the option to view them in a table:
Make sure to save your changes.
You will see that the page now contains views for Leads, Orders and Sales Reps:
Login and Test
Here is how your Admin page will look in the live application:
The Sales Rep page will look as follows: