Web Development
ReactAuthorizationUXRBACABACFeature Flags

React Permissions UX Patterns: Disabled States, Empty States, and Request Access Flows

AO
Adrijan Omićević
·14 min read

# Introduction#

Permissioned interfaces fail in predictable ways: users see buttons they cannot use, pages that flash and then disappear, and error messages that don’t explain what happened. Those failures are expensive because they drive support tickets, reduce conversion on premium features, and increase the risk of users attempting risky workarounds.

This guide focuses on React permissions UX patterns for real products: admin dashboards, B2B SaaS, internal tools, and multi-tenant apps. You’ll learn what to hide vs disable, how to handle loading and errors without “permission flicker”, how to add audit-friendly messaging, and how to integrate RBAC and ABAC checks plus feature flags in accessible React components.

If you’re also working on the underlying authz architecture, pair this with Next.js App Router authz: RBAC and ABAC patterns and our dashboard architecture guide: RBAC, audit logs, and feature flags.

# Why permissions UX is different from “normal” UI states#

Permissions UX is not just “disable a button when you can’t click it”. In permissioned UIs, a state can be blocked by multiple layers:

  • Authentication: user is not logged in, session expired.
  • Authorization: user lacks permission or policy match.
  • Entitlement: plan does not include the feature.
  • Feature flag: feature is turned off for tenant or environment.
  • Data scope: user has access to the page but not to a specific record.

Each layer should be communicated differently. A “403 forbidden” moment feels like a bug if the UI invited the user to take that path.

Two practical goals matter most:

  1. 1
    Reduce confusion: users should quickly understand what’s blocked and what they can do next.
  2. 2
    Avoid information leaks: don’t reveal the existence of resources or capabilities that a user should not know about.

ℹ️ Note: NIST 800-53 and common SOC 2 expectations don’t dictate UI behavior, but they do expect least privilege, clear access controls, and auditability. Your UI can support that by using consistent denial messages and linking actions to auditable events.

# Hide vs disable: a decision matrix that won’t bite you later#

“Hide it” and “disable it” are both valid patterns, but they solve different problems. Use these questions to decide:

When you should hide#

Hide when visibility itself is sensitive or confusing.

  • Sensitive resource existence: if seeing “Payroll” in the nav implies payroll data exists.
  • High-noise nav: if the menu becomes cluttered with irrelevant items.
  • Security boundary: if a user should not even know a capability is available.

Hiding reduces cognitive load and reduces accidental discovery, but it can also reduce product discoverability.

When you should disable#

Disable when visibility helps users understand the product and there is a legitimate path to access.

  • Upsell or internal enablement: show a disabled “Export CSV” with “Available on Pro”.
  • Role-based workflow: users collaborate, so it helps to know what exists.
  • Consistency in toolbars: keeping button placement stable reduces errors.

Disabling should be paired with explanation and optionally Request access.

A practical table for common UI surfaces#

UI surfaceDefault patternWhen to switchWhat to add
Main navigationHide unauthorized itemsDisable for discoverability in internal tools“Request access” link or “Ask admin” hint
Page content sectionsHide sensitive sectionsDisable if it clarifies workflowInline message and required role or policy
Action buttonsDisable if user can see the object but can’t modifyHide if action existence is sensitiveTooltip or helper text explaining why
Data rows or recordsHide records outside scopeShow with redacted fields when partial access is allowed“Restricted” badge and audit-friendly reason
Entry points to paid featuresDisable (not hide)Hide if feature must not be advertisedPricing link or upgrade CTA

💡 Tip: Avoid “disabled with no explanation”. If you disable something, add a reason users can discover via helper text, tooltip, or a dedicated inline message. Otherwise users treat it as broken UI.

# Model permissions explicitly: RBAC, ABAC, and feature flags together#

Permissions UX is easiest when you model checks consistently.

  • RBAC answers: does the user have a role granting permission?
  • ABAC answers: does the user match a policy for this resource and context?
  • Feature flags answer: is the feature enabled for this tenant, segment, or environment?

In many products, a single action is gated by all three.

Define a single “gate result” shape#

Design your UI components around a gate result, not around raw booleans. The UI needs to know why access is denied to render good messaging.

TypeScript
type GateDecision =
  | { allowed: true }
  | {
      allowed: false
      reason:
        | "not_authenticated"
        | "missing_permission"
        | "policy_denied"
        | "feature_disabled"
        | "plan_limited"
      required?: string
      requestable?: boolean
      auditCode?: string
    }

This makes it realistic to build consistent patterns across nav items, buttons, and pages.

Example: RBAC plus ABAC check for editing an invoice#

  • RBAC: user needs permission invoice:edit.
  • ABAC: user can only edit invoices in their region and only before “finalized”.
  • Feature flag: “Invoice editor v2” enabled for the tenant.

A good UX message might say: “Editing is restricted for finalized invoices” rather than “You lack permission”, if ABAC is the blocker.

# Avoid “permission flicker”: loading states that don’t leak information#

A common React failure mode is the “flash of forbidden content”: the UI renders content, then permissions load, then content disappears. Users notice this and it can leak information.

  1. 1
    Default to a safe state while loading: skeleton or placeholder, not real data.
  2. 2
    Render protected routes server-side when possible to avoid client-only gating.
  3. 3
    Keep loading state consistent between nav, pages, and controls.

If you use Next.js, do as much gating in the server layer as possible, and then still apply client-side gates for interactive controls. For deeper patterns, see Next.js App Router authz: RBAC and ABAC patterns.

A minimal client-side gate hook#

TypeScript
type GateState = { status: "loading" } | { status: "ready"; decision: GateDecision }
 
function useGate(key: string, context?: Record<string, unknown>): GateState {
  // Replace with your authz provider, cache, and feature flag client
  // Keep this hook deterministic: never return allowed while still loading.
  return { status: "loading" }
}

The key UX rule: while status is "loading", avoid rendering the “real” thing. Render a skeleton, a shimmer toolbar, or a disabled control with “Checking access…” helper text.

# Disabled states that explain themselves (and remain accessible)#

Disabled controls are a UX tool, but they’re also an accessibility trap if implemented incorrectly. A disabled button often cannot receive keyboard focus, which means tooltips won’t trigger and screen readers may not announce the reason.

If accessibility is a priority, align this section with your broader React a11y discipline: React accessibility checklist for ARIA, keyboard, and focus.

Pattern: “Disabled-looking” but focusable button#

Instead of a truly disabled button, you can render a focusable element that behaves disabled:

  • Use aria-disabled="true".
  • Block click and key activation in code.
  • Provide a description via aria-describedby.
  • Keep it focusable so the reason is reachable.
TSX
type PermissionButtonProps = {
  decision: GateDecision
  onClick: () => void
  children: string
}
 
export function PermissionButton({ decision, onClick, children }: PermissionButtonProps) {
  const denied = !decision.allowed
  const helpId = "perm-help"
 
  return (
    <div>
      <button
        type="button"
        aria-disabled={denied ? "true" : "false"}
        aria-describedby={denied ? helpId : undefined}
        onClick={(e) => {
          if (denied) {
            e.preventDefault()
            return
          }
          onClick()
        }}
        className={denied ? "btn btn-disabled" : "btn"}
      >
        {children}
      </button>
 
      {denied ? (
        <p id={helpId} className="help">
          {decision.reason === "missing_permission" && decision.required
            ? `Requires permission: ${decision.required}.`
            : "You don’t have access to this action."}
        </p>
      ) : null}
    </div>
  )
}

This pattern supports keyboard and screen reader users better than a hard-disabled button, while still preventing the action.

⚠️ Warning: Don’t rely on the UI to enforce security. Even if you hide or disable controls, enforce authorization on the API. Treat the UI as guidance, not a control plane.

# Empty states for “no access” vs “no data” (and why they must differ)#

Empty states are a high-impact place to get permissions UX wrong. “No invoices yet” and “You can’t view invoices” are completely different outcomes, but teams often show the same blank table.

StateWhat user seesWhat it meansBest UI copy
No dataEmpty table, create CTAUser has access, data is empty“No invoices yet. Create your first invoice.”
No access to listNo table, restricted messageUser cannot view the collection“You don’t have access to invoices for this workspace.”
Partial accessTable with fewer rowsUser can view some records“Showing invoices you have access to.”
Feature offFeature placeholderFlag or plan disables feature“Invoices are not enabled for your account.”

Avoid leaking resource existence#

If a user is not allowed to know whether invoices exist, don’t say “There are 128 invoices but you can’t view them”. Prefer a generic message: “You don’t have access to this section.”

Make empty states actionable#

A good permission empty state answers:

  • What’s blocked
  • Why
  • How to proceed

For example, if denial is requestable, show a “Request access” button and tell them which role they need.

# The “Request access” flow: fast, auditable, and not annoying#

Request access is where UX directly affects cycle time. In many orgs, access requests can take days. Your UI can reduce that by capturing the right details and routing correctly.

What a good request includes#

Collect the minimum needed to approve:

  • Requested scope: workspace, project, environment
  • Requested capability: permission or role
  • Business justification: short text
  • Duration: optional time-bound access
  • Approver or routing: manager, workspace admin, security team

Audit-friendly messaging#

When a user requests access, show a confirmation that can be audited:

  • Request ID
  • Timestamp
  • Requested role or permission
  • Target resource scope

A confirmation like “Request submitted” is not enough for enterprise users who need traceability.

🎯 Key Takeaway: A request access flow is part UX and part governance. If you can’t answer “who requested what access to which scope and why” from logs, you will pay for it later during audits and incident reviews.

Example: a simple request access payload and API call#

TypeScript
type AccessRequestPayload = {
  resourceType: "workspace" | "project"
  resourceId: string
  requested: string
  justification: string
}
 
async function requestAccess(payload: AccessRequestPayload) {
  const res = await fetch("/api/access-requests", {
    method: "POST",
    headers: { "content-type": "application/json" },
    body: JSON.stringify(payload),
  })
  if (!res.ok) throw new Error("request_failed")
  return res.json() as Promise<{ requestId: string }>
}

In practice, route this to your ticketing system, Slack approval channel, or an internal workflow engine. Many teams implement this efficiently with n8n, because approvals and notifications are mainly orchestration.

# Integrating feature flags without confusing the user#

Feature flags are often applied late and inconsistently. That produces a UX where a user has the right role, but the UI still denies them, or nav items appear then 404.

UX rules for feature flags#

  1. 1
    If a feature is off for everyone in production, remove entry points.
  2. 2
    If a feature is selectively enabled, show consistent affordances for eligible users only.
  3. 3
    If a user is ineligible, communicate the right reason: “Not enabled for your workspace” is not the same as “You don’t have permission”.

Combine flag and permission checks into one decision#

A simple approach:

  • Check flag first, because it is global and fast.
  • Then check permission and policy.

Return the first blocking reason that provides the most helpful explanation without leaking sensitive information.

Example decision builder#

TypeScript
function decide({
  flagEnabled,
  rbacAllowed,
  abacAllowed,
}: {
  flagEnabled: boolean
  rbacAllowed: boolean
  abacAllowed: boolean
}): GateDecision {
  if (!flagEnabled) return { allowed: false, reason: "feature_disabled", requestable: false, auditCode: "FLAG_OFF" }
  if (!rbacAllowed) return { allowed: false, reason: "missing_permission", required: "invoice:edit", requestable: true, auditCode: "RBAC_DENY" }
  if (!abacAllowed) return { allowed: false, reason: "policy_denied", requestable: false, auditCode: "ABAC_DENY" }
  return { allowed: true }
}

This structure supports UI consistency and audit logging through auditCode.

# Error states: distinguish “forbidden” from “broken”#

A major UX improvement is to stop treating authorization failures as generic errors.

The three error classes users feel#

Error classTypical HTTPWhat user thinksBest UX response
Forbidden403“I’m blocked”Explain required role or process; provide request access
Not found404“This doesn’t exist”Avoid leaking: can be used for both missing and unauthorized resources
Server failure500“It’s down”Retry, status page link, capture correlation ID

If your API uses 404 to mask unauthorized resources, your UI should still display a coherent message based on your gate decision and routing context.

Include correlation IDs for support and audit#

When you show an error, include a reference ID the support team can search in logs. Keep it copyable.

Example copy: “Reference ID: req_12345”.

# Practical patterns for common React surfaces#

This section shows how to apply the patterns in the places users most often encounter permissions.

For multi-tenant SaaS, hiding unauthorized nav items is usually the best default. It reduces noise and avoids drawing attention to restricted areas.

For internal tools, a “locked” nav item can reduce training burden, but only if clicking it leads to a helpful page explaining how to gain access.

Implementation notes:

  • Don’t render the nav item at all if reason is “feature_disabled”.
  • Consider rendering a “Locked” label if requestable is true.

Pages: avoid loading flashes and provide clear gates#

A protected page should have:

  • A loading skeleton while checks are pending
  • A denied view with explanation and next steps
  • The normal view when allowed

Tie this to your overall admin architecture and auditing approach from React admin dashboard architecture with RBAC, audit logs, and feature flags.

Tables and row actions: separate “view” from “act”#

In grids, permissions are often mixed:

  • User can view rows but cannot delete
  • User can view some rows but not others
  • User can edit only rows matching a policy

A robust approach:

  • Gate the table itself with a “view list” permission.
  • Gate row actions separately with per-row ABAC context.

This avoids the worst UX bug: showing a table briefly, then wiping it.

# An implementation checklist you can ship with#

Follow these steps to make permissions UX consistent across a React app.

  1. 1
    Create a shared gate result shape that includes denial reasons and requestability.
  2. 2
    Implement a single gating API in the frontend that merges feature flags plus RBAC plus ABAC.
  3. 3
    Standardize components: PermissionButton, PermissionNavItem, PermissionEmptyState.
  4. 4
    Define copy templates for each denial reason, including non-leaky variants.
  5. 5
    Add request access with a request ID and store it in audit logs.
  6. 6
    Test keyboard flows and screen reader announcements, using the baseline from our React a11y checklist.

# Key Takeaways#

  • Hide unauthorized UI by default for sensitive areas, and use disabled states only when they improve discoverability and provide a clear next step.
  • Avoid permission flicker by rendering safe loading placeholders until feature flags and RBAC and ABAC checks are ready.
  • Use a structured gate decision object with denial reasons, required permissions, and audit codes to keep messaging consistent and loggable.
  • Build accessible “disabled-looking” controls with aria-disabled and descriptive helper text so keyboard and screen reader users get the same explanation.
  • Make “Request access” flows auditable with request IDs, scope, justification, and predictable routing to approvers.

# Conclusion#

Good permissions UX prevents confusion, reduces support load, and makes authorization decisions defensible during audits. The winning pattern is consistent gating across navigation, pages, and actions, with clear reasons, accessible UI states, and a request access flow that produces traceable outcomes.

If you want this implemented end-to-end in a React or Next.js app, including RBAC and ABAC enforcement, feature flags, and audit logs, contact Samioda via our web development services or start with our architecture guide: React admin dashboard architecture with RBAC, audit logs, and feature flags.

FAQ

Share
A
Adrijan OmićevićFounder & Senior Developer

Founder & Senior Developer at Samioda. 8+ years building React, Next.js, Flutter and n8n automation solutions for clients across Europe.

Need help with your project?

We build custom solutions using the technologies discussed in this article. Senior team, fixed prices.