Everyone has admin access Role-based permissions in 30 days

For applications where everyone has the same access level and that is no longer acceptable. We design the permissions model, build server-side enforcement at the API and database layer, and ship an admin UI for role management with audit logging your buyers can review.

  • Working proof in 30 days
  • Fixed scope and timeline
  • 30 days From kickoff to production delivery
  • Week 1 Technical diligence and planning
  • Week 4 Production deployment and handoff

How it shows up

Enterprise buyers require role-based access before signing. No RBAC means no enterprise sales, no SOC 2, and no protection against internal mistakes.

The access control gap

Every user in your application can see and do everything. An intern can delete production data. A contractor can export the customer list. Buttons are hidden in the UI but the API accepts every request, so permissions are cosmetic. This drift is common when access rules are split across frontend logic, services, and queries: the role looks right in the database while a lower-privilege user can still repeat the same call. Your enterprise prospect asked for viewer and editor roles and your answer was 'we are working on it.' Your SOC 2 readiness assessment flagged 'no access control model' as a critical finding.

Enterprise deals blocked at security review

The prospect's security team asks: 'What roles exist? How are permissions enforced? Is there an audit log?' Your answers are 'one role, client-side only, and no.' These questions arrive on standardized questionnaires (CAIQ, SIG Lite, VSA) where access management is its own section, and procurement teams often ask to see your audit log before they ask about pricing. The deal requires RBAC as a contractual condition. Without it, procurement cannot approve.

SOC 2 certification blocked

SOC 2 Trust Services Criteria CC6.1 requires logical access controls, and CC6.3 requires that access to data and functions is granted, modified, and removed based on roles. 'Everyone has admin access' fails both. Your auditor flags it and asks for role definitions, access reviews, and proof that leavers lose access. Certification stalls. Enterprise customers who require SOC 2 compliance cannot buy until it is resolved.

Internal data incidents

A support agent accidentally deletes a customer's workspace because delete buttons are visible to everyone. A contractor exports the full customer list because there is no read-only role. Every user with full access is a potential incident.

Who it is for

Best for SaaS products where all users have the same access level and that is blocking enterprise sales or compliance.

Best fit

You have a production application with no permission boundaries and it is becoming a business problem.

  • Every user has full access with no viewer, editor, or admin distinction
  • Permissions exist only as hidden UI elements, not API enforcement
  • Enterprise deals require RBAC as a contractual condition

What happens without RBAC

The risk grows with every user added.

Compliance exposure widens

As you add team members and customers, the number of users with unrestricted access grows. Every one of them is a vector for accidental data exposure. Regulators and auditors see this as a control failure that gets worse over time.

Enterprise upmarket blocked

Moving upmarket from SMB to enterprise requires RBAC, audit logging, and compliance readiness. Without them, your total addressable market has a ceiling. Every competitor with proper access control is positioned above you.

Bolt-on RBAC creates tech debt

Eventually you add if-statements checking user roles in dozens of places. No central policy engine. No database-level enforcement. Permissions are inconsistent between the API and UI. The bolt-on approach takes longer to maintain than building it right.

What we do in 30 days

From 'everyone is admin' to server-enforced role-based permissions with audit logging in 30 days.

  1. Days 1-5: Permission model design

    Audit every API endpoint and UI action in your application. Design the permission model: define roles (owner, admin, editor, viewer, custom), map permissions to roles, and identify resources that need access control. Plan the enforcement strategy: API middleware for endpoint-level checks, Supabase RLS for database-level isolation.

  2. Days 6-14: Enforcement layer

    Permission checking middleware deployed on all API endpoints. A Custom Access Token Auth Hook writes role claims into the JWT, and Supabase RLS policies read those claims to enforce data access at the database level, so even a direct database connection respects permissions. UI elements conditionally render based on user role. Audit logging captures every permission-sensitive action. Proof release: a viewer role can read data but cannot modify or delete anything, enforced at the API and database level.

  3. Days 15-30: Management and compliance

    Admin UI for role management: create custom roles, assign permissions, manage user role assignments. Role assignment integrated into the invite and team management flow. Audit log viewer showing who did what, when, and which resource was affected. Permission model documentation for SOC 2 auditors. Existing users migrated to appropriate roles based on current usage patterns.

What you get

A production RBAC system with server-side enforcement, not hidden buttons.

Shipped deliverables

Complete role-based access control with enforcement at every layer and audit logging for compliance.

  • Permission model: roles, permissions, and resource-level access rules
  • API middleware enforcing permissions on every endpoint
  • Supabase RLS policies for database-level access control

Why Pineido

We build RBAC on Supabase with Row-Level Security.

Database-enforced permissions

Most RBAC implementations check permissions in application code only. If someone bypasses the API, the database is unprotected. We enforce permissions with Supabase RLS policies at the database level. Even a direct SQL connection respects the permission model. We store role and permission data in app_metadata, which the user cannot edit, never in user_metadata, which they can, because that distinction is where many Supabase RBAC builds quietly break. RLS policies read auth.uid() and the role claim from the JWT, wrapped in a select so the optimizer evaluates them once per statement instead of once per row. We know cross-tenant data leaks happen when RLS is misconfigured, and we have built this pattern across multiple production SaaS applications.

Common questions, plain answers

Do you support custom roles or just fixed roles?

Both. We ship with standard roles (owner, admin, editor, viewer) and a role editor where admins can create custom roles with specific permission sets. Most teams start with standard roles and add custom roles as enterprise customers request them.

How does RBAC integrate with Supabase RLS?

A Custom Access Token Auth Hook writes the user's role claim into the JWT, stored in app_metadata so the user cannot tamper with it. RLS policies read that claim on every query through an authorize check. A viewer's SELECT query returns data but their DELETE query is rejected at the database level. No application code bypass is possible. One honest caveat: a role change takes effect once the JWT refreshes, so we wire role updates to force a token refresh.

Will this help with SOC 2 certification?

Yes. RBAC with audit logging directly addresses SOC 2 CC6.1 (logical access controls), CC6.3 (role-based authorization to grant, modify, and remove access), and CC7.2 (monitoring). We include documentation mapping your permission model to the 2017 Trust Services Criteria with the 2022 revised Points of Focus that your auditor can reference, including the access-review evidence they expect to see.

How do you handle permissions for API endpoints, not just UI?

Every API endpoint checks the user's role before processing the request. We enforce permissions at the middleware layer so no endpoint can accidentally skip authorization. Database queries are additionally protected by RLS policies. Even if your API has a bug, the database rejects unauthorized access.

Can customers manage their own team roles and permissions?

Yes. Organization admins get a permissions management interface where they can create custom roles and assign specific capabilities. This is a key enterprise feature because large customers need to enforce their own internal access policies within your product.

What does the RBAC audit log capture?

Every permission check, role change, and access attempt is logged with the user identity, action, resource, timestamp, and result. Your compliance team can query who accessed what and when. Failed access attempts are flagged separately so security incidents are visible immediately.

30 days From kickoff to production delivery

Stop giving everyone admin access

Every user with unrestricted access is a compliance risk and an enterprise deal blocker.

Fixed price.

You leave with

  1. Day 1: Audit all API endpoints and UI actions for permission mapping
  2. Day 5: Permission model designed with roles, resources, and enforcement strategy

ByFounder and Imaginator

Published Updated