Table of Contents

Create an Admin User Role to View All Records

Lesley Updated by Lesley

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.

Scenario

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 app.

Requirements

You will need to have user logins enabled to allow for multiple user roles.

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

To add a user role for Admin users, click green “+” button next to User Roles. This will prompt you to give your new user role a name. In this case, we want to use "Admin" for the name.

In the Records section of the Builder for the newly created Admin role, click the “Add Record” button to add a new Admin user record.

Create a Login Page for Admin

Now that you have created the Admin user role, you need to add a new page for the Admin users to access the Live App.

In the Pages section of the Builder, click the green "+" button and select "Login Page".

Next, select "Limit permissions to specific user roles" and choose Admin.

Next, you will be prompted to add a view to the new Admin page then name your page. Since the goal is to all Admin users to see all records, you can add any view type displaying any tables you wish.

You can read more on adding and managing pages here.

Add Views to the Page

Once your Admin page is added to your app, you can add views displaying any of your records you choose. From the Pages section of you app, you can add a new view by clicking the "Add View" button in the top menu.

This will prompt you to choose the view type and what records will show. In this example, we are adding a grid view which will show all Employee records.

You can read more about adding and managing views here.

You can read the process of adding Admin pages and views as much as you need for you app.

Login and Test

Now that you have set up your Admin page, open that page in the Live App by clicking the "Go to Live App" button in the top right to test your app (you may need to select it from the drop-down menu if you have more than one page).

Login with the email and password you created with your test Admin user and you can view any views you added to your Admin page.

Notes

Manage Users From Admin Page

One advantage to building an Admin page is that you can also manage your users directly in the Live App instead of having to go into the Builder.

To manage users in the Live App, you will need to add a view display records for your users. Views displaying user records can be added in the same way as views displaying regular table records.

For example, here we have added a grid view displaying Employee records. With inline editing enabled, the Admin user can login and make changes to each Employee user record, such as updated the User Status to active.

How did we do?

Show Records Connected to the Logged-in User

Contact