Users & Access

Use Knack's users and access features to require users to login to your app before accessing your powerful data.

One of the first steps in building your Knack application is to answer these two questions:

  • Who will be using your application?
  • What level of access do they need?

By default, anyone can access any Knack app just by knowing the URL. For example, anyone can use this link to access our business directory sample app.

You can use Knack's user features to require that users must first login before they can access your app.

This is what our sample customer portal app looks like when a login is added:

Image of the Customer Portal sample app's login view

Once a user is logged-in, you can further control which pages, records, and workflows they can access.

If you’re not sure if you need user features, ask yourself the following questions:

  • Do I have different types of users, like Managers and Employees or Admins and Customers?
  • Do I need to share any records that are confidential, like employee reviews, medical histories, or business financials?
  • Do I want to track which user updated my records?
  • Do I want to limit the records my users see to what is relevant to them?
  • Do I need multi-tenancy?

If you answered yes to any of these questions, you will need to enable user features in your app.

Knack’s user features are powerful and flexible enough to build applications that handle a variety of user scenarios. We'll dive into more information about how to add these features to your apps, and then provide some common examples.

 

How to Add User Features to Your App

In Knack, access control is managed using a few features that define the who and the what in your app:

  • User roles
  • Login views
  • Page rules
  • Connections

Who can access your app?

User Roles are all about defining the who.

When determining your roles, think who will be using your app and how they will be using it. Roles are not necessarily based on title, but function.

What can your users access?

Login viewspage rules, and connections are all about defining the what. Logins and page rules will dictate what parts of your Live App your different users can access.

The Views on those pages will draw upon connections to determine what data is displayed to each user. You can customize your pages to only display the data related to, or connected to, the logged-in user.

Image of an example Live App page with multiple views

 

 

 

 

Users & Access Examples

The following are examples of different types of apps you can build that leverage Knack’s user features. All of the apps listed in these examples can be found in our sample app directory.

Most of these examples are multi-tenant, which is a fancy phrase that means different users can use the same app but only access their related records.

You’ll see other common user features being shared across these apps, including:

  • Securing confidential information
  • Allowing users to access records for an entire group they belong to
  • Defining different permissions for different types of users
  • Triggering user-based workflows
  • Tracking which user made changes

Image of a customer's review regarding users and access

 

 

Creating Portals

Portals are perfect for defining groups of users and giving them access to specific data and workflows. For example, you can create custom portals for your:

  • Customers: to submit orders, pay invoices, and see their own repairs, warranties, etc.
  • Vendors: to submit quotes, review order histories, and view notifications and reports
  • Teachers: to manage their students, classes, and attendance

The portal possibilities are endless!

An excellent example of a portal is our Customer Portal sample app. This application simplifies the process for customers to manage their accounts with your business.

Customers can securely log in, submit service requests, track the status of their requests, and view invoices.

You can extend portals with e-commerce and workflows. Our Customer Payment Portal enables customers to pay their invoices directly in the app.

You can also build email notifications into your portal to update users when changes are made or remind them to perform specific actions.

Image of the Live App for the Customer Portal sample app

Next, we will go into more common examples on how to utilize user features within Knack and how users and their access to your apps work with other powerful features you can implement. See further details in this article here