Page and Layout Security
Transcript Summary
Introduction
What's up, databasers? Sam here, and in this video, I'm going to teach you all about security in Tadabase. We’ll cover how to secure your app so that only certain people can access it.
Different Levels of Security
Tadabase offers various levels of security:
- App-Wide Security: This includes blocking specific IP addresses, which I’ll show you in a minute.
- Layout Security: Even if someone can access the app, can they access specific layouts?
- Layout Rows Security: Which rows within a layout are visible to certain users?
- Page Security: Can users access specific pages within the app?
- Page Rows Security: You can also enable security for rows within a page.
Analogy: A Hospital
To understand the security levels, let's compare your app to a hospital:
-
App-Wide Security: The hospital building has a checkpoint at the entrance. This is similar to letting someone into your app. You may have a login process, and once users pass this, they can access the app, just like entering the hospital.
-
Layout Security: Within the hospital, there are different floors, such as the Maternity Ward. Even though someone can enter the hospital, they may not have access to certain floors. In the app, this is akin to layout security.
-
Page Security: On each floor, there are wards. Just as a hospital limits access to certain wards, your app can limit access to specific pages.
-
Row Security (Layout and Page Rows): Once in a ward, there are rooms. Not everyone can enter all rooms. Similarly, row-level security ensures that certain data rows are only visible to authorized users.
Setting Up Security in Tadabase
App-Wide Security
Let’s dive into the app to show you how to configure these settings. We’ll start with app-wide security:
- Go to Settings > App Security Settings.
- Here, you can enable features like Auto-Logout and IP Security.
- IP Security allows you to block or allow specific IP addresses. For example, if your app is in development, you can restrict access to only your own IP address.
Layout Security
Next, we have layout security. In Tadabase, layouts group pages for specific users, such as employees, admins, or customers:
- Go to Layouts and choose a layout (e.g., Employees Layout).
- Under the Security tab, you can:
- Allow anyone to access the layout (no login required).
- Restrict access to logged-in users or users with specific roles.
- Choose what happens if someone isn’t authorized (e.g., display a custom message or redirect them to another page).
Page Security
Page security inherits settings from the layout by default, but you can customize it:
- You can restrict access to specific roles (e.g., only senior employees or admins can view certain pages).
- If a user doesn’t have permission to view a page, you can redirect them to a login page or another section of the app.
Layout and Page Rows Security
Finally, we have row-level security, which applies to specific rows within a layout or page:
- Select a row, such as a navigation menu item.
- Under Visibility, you can restrict who can see this row (e.g., only admins can see the “Go to Admin Dashboard” button).
- This ensures that users only see the parts of the app relevant to their role.
Practical Use Case
For example, if you have an Employees Layout that both employees and admins can access, but only admins should see the link to the admin dashboard, you can configure the link’s visibility to only be visible to admins.
Similarly, on the Page Rows level, you can restrict specific data rows to users with certain roles, such as contact notes being visible only to salespeople.
Best Practices for Security in Tadabase
- Create Different Layouts for Different Roles: This ensures that security is well-defined for each user type.
- Avoid Loops: When using redirection, ensure that users aren’t redirected to pages they can’t access, as this could trap them in a loop.
- Don’t Overload Pages: Instead of cramming too much data into one page, split it across multiple pages for better security and performance.
Conclusion
Tadabase provides a highly granular security system that allows you to control access at various levels, from the app itself down to individual rows within a page. This gives you maximum flexibility in protecting your app and its data.
Thank you for watching, and have a wonderful day!
We'd love to hear your feedback.