User logins are one of Knack’s most powerful features. They let you build applications where users can log in and have permissions to access specific records.
We recently converted two user attributes into database fields:
- User Status: this controls whether the user has active access to log in. Options include “pending approval” and “inactive”.
- User Roles: this controls which roles the user is assigned to. Each role can have access to different pages of the app and be connected to different records.
This opens up some powerful user workflow features:
Form rules, tasks, and the API can be used to update the user status to “approved” or “inactive” when a certain transaction happens. If you start a user as “pending approval” then they won’t be able to login until the status is updated. You can even use Zapier to update this status when a payment is made from Stripe or Paypal.
Likewise you can assign a user role with form rules or tasks. Conditions can be used to determine which user role to assign. For example, a user can be assigned a role when a certain amount of points are scored.
Because these attributes are now easily controlled from your app, you can create a specific page for “Admin” users to login and manage user rights and statuses without needing to access the builder.
We’re really excited about the possiblilties this opens up to add user workflow features to your online database. Let us know how you’re using these so we can share other great examples.