Learn how to secure pages and require users to login. 

There are 2 ways to go about securing your data and content in the app:

  1. Secure the entire page
  2. Secure specific rows within a page


1. Let's first look at how to secure the entire page.


1) Select the page you wish to secure, then click Settings


2) Under "Who can view this page" select one of the 2 options:

  1. Only Logged-in Users - this will allow any logged-in user, no matter their role, to view the page
  2. Only Users in Specific Roles - you can restrict the page to only users in particular roles



You can even customize the error message that will appear if an Incorrect Username/Password is entered or if a Not Authorized person tries to view the page.

 

Once you secure the page and click save you'll see a lock icon in the list of pages on the left:



2. The second option is to secure just a row within a page


Use Case: Suppose you'd rather have one page that several different user roles can see, but only the "Admin" can see and add records to that page.


In the page builder, hover over a row and click the pencil icon to "Edit Row and Permissions"

Under "Visibility" select any of the following options:

  1. Public - Anyone who accessed this page can see this row
  2. Only For Non Logged-In Users - hide this row from anyone who is logged in
  3. All Logged-in Users - show this to anyone as long as they're logged in
  4. Specific User roles - Select unique roles who can view this row




Customizing login messages:


Here's how to customize your login message:

  1. Go to our app settings
  2. Click on our default login page
  3. Click on the login component


In this side bar we have access to customizing:

  1. The default message
  2. Already logged-in message
  3. Incorrect Username/Password
  4. Not Authorized Message
  5. Not allowed status Message

Note: This works in any login component, not just this default one.


Also, this is where we enable password resets (More info below)



1. Default Message


2. Already Logged in


3. Incorrect Username/Password


4/5. Not Authorized Message or Not Allowed Message



Enable Password Resets:


There will be times when users will forget their passwords and want to reset them. We can enable this option by selecting any login component. You also have the ability to customize the email template they will receive upon requesting a new password.



Customize the template as you wish.


Keep in mind:

{appName} = The name of your app

{name} = The name of the user requesting a new password

{code} = The code the user needs to enter to reset the password


Please note that emails sent for password resets will default to using the "From Name" and "From Email" of your email settings. If this setting is not defined, the email will appear from hello@tadabase.io. You can make these changes by going to Settings > Email Settings > General tab