Note

← Back to notes

Frontend Permission Checks Are Product Gates, Not Security Boundaries

Frontend permission checks improve clarity, but backend authorization protects the system.

Permissions Product UX Admin tools Security boundaries

The problem

Infrastructure products rarely have one universal action model. Whether a user can create, edit, start, stop, delete, or configure something often depends on several pieces of product context.

  • organization and project membership
  • role and permission level
  • quota and billing state
  • feature flags
  • resource ownership

If the frontend ignores these rules, users see actions they cannot complete. That creates dead ends: buttons fail late, flows terminate at an error, and users have to infer which piece of context is wrong.

But the opposite mistake is worse. If the frontend tries to enforce security by itself, the system becomes unsafe. UI checks can improve product behavior, but they cannot be the authority.

The model

I think about this as a two-layer model: backend authorization and frontend capability UI.

Backend authorization

The backend is the source of truth. It validates whether the user can perform the action, regardless of what the UI showed or hid.

Frontend capability UI

The frontend uses permission and context data to make the product understandable: hide irrelevant actions, disable unavailable actions, explain blocked states, and avoid leading users into dead ends.

Why it matters

This separation improves product clarity without pretending the frontend is a security boundary. The UI can guide users toward actions that make sense while the backend still protects sensitive operations.

  • fewer confusing actions
  • clearer disabled states
  • better error recovery
  • better admin and customer workflows
  • safer handling of sensitive operations

Trade-offs

Hiding actions keeps the UI clean, but it can make users wonder where a feature went. Disabling actions with explanations is often better when the user can fix the issue: upgrade billing, switch projects, request access, or adjust quota.

For sensitive or destructive operations, backend authorization must always win. In internal admin tools, explicit unauthorized states and audit-friendly behavior are often better than silently hiding everything, because operators need to understand why a workflow is blocked.

Where this shows up

This pattern shows up anywhere product capability depends on account, project, resource, or operational context.

  • AI infrastructure workflows
  • admin dashboards
  • billing pages
  • quota controls
  • org / project switching
  • feature-gated products
  • internal operations

The takeaway

The frontend should make permissions understandable; the backend should make them enforceable.

Related case

Related case: AI Infrastructure Product Workflows

This permission model shows up across model APIs, deployments, billing, quota, admin tools, and org/project-scoped workflows.