Users & Roles
Transcript Summary
Introduction
Hi everyone, Sam here. In this video, I’m going to be talking all about users and roles in your app.
Understanding Users
In your app, different people can log in and use the app. For example, you might have:
- Bob, who's an admin running your company from the back end.
- Melissa, who's on your sales team and uses the app to see sales data.
- Kevin and Barbara, who are customers logging in to see their information.
Each of these people is a user of your app.
Understanding Roles
Roles are groups that users are placed into. For example:
- Bob’s team could all be grouped into the admin role.
- Customers like Kevin and Barbara would be grouped into the customer role.
- Salespeople like Melissa would be grouped into the sales team role.
The advantage of roles is that you can assign the same permissions to all users in a role. For instance, admins can see all the data, customers only see data relevant to them, and the sales team only sees sales data.
Users Table in the Builder
In the Builder, you have a users table that comprises six fields:
- Name
- Profile Picture
- Status
- Role
- (Hidden) Password Field for security reasons
When adding a new user, you will see the password field, but it’s not displayed in the table for security.
Adding Users
There are three ways to add users to your system:
- Through the Data Builder by adding a record.
- Through a form on your app, allowing someone like an admin to add users from the live app.
- Self-signup, where users can register themselves through a signup page.
Adding Users Example
Here’s what it would look like:
- You input the user’s name, email, and role, set a password, and save it.
- Once saved, the user is added to your users table, but the password isn’t displayed for security reasons.
Understanding User Fields
Each user is represented by a record in the users table. Here’s what the fields mean:
- Name: The user’s name.
- Email: Used for login, password resets, and tracking logged-in users.
- Profile Picture: A picture for the user’s profile.
- Status: A dropdown field where you can set statuses like active, inactive, or not verified.
- Role: Defines the user’s permissions and access.
Managing User Status
- If a user is inactive, they won’t be able to access the app.
- You can change their status to active when needed.
- The "not verified" status can be used when users haven’t created a password yet.
Creating and Managing Roles
Every app comes with a default role. To create more roles:
- Click the Roles button.
- Add new roles like admin, sales, or customer.
- Assign users to these roles.
Roles allow you to manage permissions for groups of users, such as restricting certain pages to admins or sales teams without manually setting permissions for each individual user.
User Settings
In the Settings section, you can customize how users log in and sign up. You can enable options like:
- Email login
- Single Sign-On (SSO) using platforms like Facebook, Google, or Twitter.
User Logs and Security Options
You can enable user login logs to track successful logins, IP addresses, locations, and failed login attempts. You can also enforce password complexity and enable Two-Factor Authentication (2FA) for added security.
Unique Emails
Each user needs a unique email address to prevent issues like duplicate logins or password resets being sent to the wrong person.
Example: Tracking Record Changes
You can track who makes changes to records by using the created by field. For example, when a record is created, it can log the user's name from the users table.
Page Restrictions Based on Roles
You can restrict access to certain pages based on roles. For example:
- Only admins can access admin pages.
- Sales teams can access sales-related pages.
- You can also filter columns in tables based on user roles.
Enabling Sign-Up Pages
By enabling a sign-up page, users can register themselves by inputting their information and creating a password. They are automatically added to the users table once they sign up.
Conclusion
This video explained the concepts of users and roles in your app, how to manage them, and the importance of roles for organizing user permissions. Thank you for watching! Have a great day.
We'd love to hear your feedback.