How to Create an Admin User Role to View All Records

Set up a dedicated admin user role in Knack with unrestricted access to all records, and manage users directly from the Live App.

What You'll Learn

  • How to create an admin user role
  • How to set up a dedicated admin page with full data access
  • How to manage users directly from the Live App without accessing the Builder

Use Case

In addition to roles for Customers, Sales Reps, and others, many applications benefit from an "Admin" role. This role is different from a shared builder in the Knack Builder. It's specifically designed for administrators to have unrestricted access to all records within the Live App.

As an Admin, you'd need access to Leads, Orders, Sales Reps, and other records within the application.

Requirements

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

📘

Security settings

Learn more about security settings available with user logins in How to Manage User Role Access.

Adding a User Role for Admins

  1. Click the + button next to the User Roles option in the Data section. You'll be prompted to name the new user role. Use "Admin" as the name.
  1. In the Records section of the Builder for the newly created Admin role, click Add Record to add a new Admin user record.

Creating a Login Page for Admins

Once you've created the Admin user role and added an Admin user record, add a new page specifically for Admin users.

  1. In the Pages section of the Builder, click the + button and select Login Page.
  1. Choose Limit permissions to specific user roles and select the Admin role.
  1. Name your page and add your first element. Since the goal is to give Admin users complete access to all records, you can add any element type displaying any records you need.

Adding Elements to the Page

After adding the Admin page, add elements displaying the records you need.

  1. Navigate to the Pages section and click Add Element in the top menu.
  1. Select the element type and specify which records to display. For example, add a table element showing all employee records.

Login and Test

  1. Click Preview or Go to Live App in the top right corner to test your app. If you have multiple pages, select the Admin page from the dropdown menu.
  1. Log in using the email and password for your test Admin user to access and view the elements on your Admin page.

Managing Users From the Admin Page

An added benefit of creating an Admin page is the ability to manage users directly from the Live App without accessing the Builder.

To manage users from the Live App, add an element that displays user records. For example, add a table element showing Employee records. By enabling inline editing, the Admin user can log in and update each Employee user record, such as changing the User Status to active.

Next Steps