← The Tech World

Security · Definition

What Is Role-Based Access Control (RBAC)? A Permission Matrix and Design Guide for Client Portals

Athar Ahmad
Reviewed by Athar Ahmad, Founder & CEO · Certified Bubble.io Developer
Written by the SA Solutions team ·

What RBAC and least privilege mean, an example permission matrix for a client portal, how to design and test roles and how it works in Bubble.io.

Last updated: October 2026. Written by Athar Ahmad, Certified Bubble.io Developer and Tech Architect, Simple Automation Solutions.

Quick answer

Role-based access control (RBAC) manages who can see and do what by assigning people to roles with defined permissions, ideally following the principle of least privilege. For a client portal, define roles such as client, staff, manager and admin, build a permission matrix, enforce it with privacy rules in the data and not only by hiding interface elements, and test every role with multiple accounts. Avoid shared accounts, too many admins and missing offboarding.

Key takeaways

  • RBAC = access by role; least privilege = only what each role needs.
  • Write a permission matrix before building.
  • Enforce access in the data with privacy rules, not by hiding buttons.
  • Test every role and try to reach other users’ data.
  • Avoid shared accounts, too many admins and no offboarding.

In this guide

  1. What is role-based access control?
  2. RBAC and the principle of least privilege
  3. An example permission matrix for a client portal
  4. How do you design roles?
  5. How is RBAC implemented in a Bubble.io app?
  6. How do you test roles?
  7. What are common RBAC mistakes?
  8. How does RBAC link to the rest of security?
  9. Frequently asked questions

What is role-based access control?

Role-based access control, or RBAC, is a way of managing who can see and do what in a system by assigning people to roles, and giving each role a defined set of permissions. Instead of setting permissions person by person, you decide what a client, a staff member, a manager or an administrator may do, and then assign each person the right role.

RBAC and the principle of least privilege

RBAC works best alongside the principle of least privilege: each role should have only the access it needs to do its job, and no more. This limits the damage from mistakes, misuse and compromised accounts.

An example permission matrix for a client portal

Action Client Staff Manager Admin
View own matters and documents Yes Yes, assigned clients Yes, team clients Yes
Upload documents Yes, own matters Yes, assigned clients Yes Yes
Delete documents No Limited, with a reason Yes Yes
See other clients’ records No No, unless assigned Team only Yes
Send messages Yes, own matter Yes Yes Yes
View internal notes No Yes Yes Yes
See billing and rates Own invoices only Limited Yes Yes
Manage users and roles No No Limited Yes
Change system settings No No No Yes
Export data No Limited Yes, logged Yes, logged

This matrix is an illustration. Your firm’s roles and rules will differ, and they belong in the PRD.

How do you design roles?

  1. List the types of people who will use the system, including clients, staff, managers, admins and any external parties.
  2. List the actions and data each needs to see and do.
  3. Group them into a small number of roles. Too many roles become unmanageable.
  4. Apply least privilege. Start from no access and add what is needed.
  5. Define special cases, such as a staff member assigned to a client or a manager covering a team.
  6. Decide who can assign and change roles, and log changes.
  7. Test every role.

How is RBAC implemented in a Bubble.io app?

A typical pattern is a role field on each user, plus relationships linking users to the clients, teams or accounts they may access. Privacy rules on every data type then grant access based on the current user’s role and relationships, so access is enforced in the data and not just by hiding buttons. The interface can then show or hide elements to match, which improves the experience but is not security. See our security guide, multi-tenant architecture and database design mistakes.

How do you test roles?

  • Create a test user for each role and for two different clients or accounts.
  • Try every action in the matrix as each role.
  • Try to reach another client’s records by changing IDs and by searching.
  • Check files and attachments as well as records.
  • Check what happens when a user’s role changes or when they are removed.
  • Retest after every significant change.

What are common RBAC mistakes?

  • Hiding, not protecting. Roles enforced only in the interface can be bypassed.
  • Too many admins. Give admin rights sparingly.
  • Shared accounts, which destroy accountability.
  • Too many roles, creating confusion and gaps.
  • Forgetting external parties such as contractors or advisers.
  • No offboarding process, so former staff keep access.
  • No review. Roles drift as the business changes.

RBAC controls what an authenticated user may do. It sits alongside strong authentication, such as multi-factor authentication, an audit trail of key actions and sensible retention. Together they let a firm show who had access, who did what and why. Builds at Simple Automation Solutions start at $3,500, and a $345 Discovery Sprint, credited toward the build, defines roles and the permission matrix in the PRD. See what to cut before you build.

Frequently asked questions

What is role-based access control?

A way of managing access by assigning users to roles with defined permissions, instead of setting permissions person by person.

What is the principle of least privilege?

Each role should have only the access it needs to do its job, and no more.

How many roles should a client portal have?

Usually a small number, such as client, staff, manager and admin, with special cases handled by relationships such as assignment.

Is hiding a button the same as restricting access?

No. Access must be enforced in the data, with privacy rules, because hidden interface elements can be bypassed.

How do I test roles?

Use a test user per role and per account, try every action and try to reach other users’ data directly, then retest after changes.

Want roles and permissions designed properly for your portal?

Email us who will use your system and what each person needs to see. We will draft the permission matrix.

Email info@sasolutionspk.com

Athar Ahmad, Certified Bubble.io Developer and Tech Architect, Simple Automation Solutions

About Simple Automation Solutions (SA Solutions)

Simple Automation Solutions is a Bubble.io development studio led by Athar Ahmad, a Certified Bubble.io Developer and Tech Architect. It builds web and mobile apps, client portals and SaaS products for founder-led businesses such as law firms, accounting firms, boutique agencies and consultants. Services include a free 30-minute Idea Audit, a $345 Discovery Sprint (a Product Requirements Document delivered within 24–48 hours, credited toward the build) and builds starting at $3,500. Website: sasolutionspk.com.

Related guides