Glossary

What are Bubble.io Privacy Rules?

Privacy Rules are Bubble.io's row-level security system that controls which users can view, find, modify, or delete specific database records — serving as the primary access control mechanism for data protection in Bubble applications.

How They Work

Per-Data-Type Rules

Each data type gets its own set of privacy rules, independently controlling read, search, modify, and delete permissions.

Condition Evaluation

Rules use Bubble expressions to check the current user, field values, and relationships before granting access.

User Role Checks

Rules can reference user fields, roles, or group memberships to implement role-based access control.

Field-Level Privacy

Individual fields within a data type can be hidden from users who can otherwise see the record.

Performance Impact

  • Evaluated on Every QueryPrivacy rules run on every database read, adding overhead proportional to rule complexity.
  • Missing Rules Cause Full ScansWithout explicit rules, Bubble may return all records or none — both are dangerous defaults in production.
  • Complex Conditions Slow SearchesRules that traverse relationships or call external data sources can significantly slow down list queries.
  • Rule Order MattersBubble evaluates rules top-to-bottom and stops at the first match, so ordering affects both correctness and speed.

Migration Mapping

  • Middleware PoliciesMap to Express/Next.js middleware that checks permissions before route handlers execute.
  • Pundit (Ruby)Each Bubble data type becomes a Pundit policy class with methods for each action.
  • Django GuardianObject-level permissions in Django mirror Bubble's per-record access control model.
  • Laravel GatesLaravel's Gate and Policy system provides equivalent row-level authorization logic.

Why Extraction Matters

  • Security-Critical LogicPrivacy rules encode your entire authorization model. Losing them during migration means losing your security posture.
  • Often UndocumentedMost Bubble teams never write down their privacy rules. Extraction is the only way to capture them before migration.
  • Must Be Preserved ExactlyA single missing or incorrect rule can expose private data or block legitimate users in the migrated system.
  • Drives Architecture DecisionsComplex privacy rules often determine whether to use row-level security in Postgres, a policy engine, or custom middleware.

Related Terms

Data type extractionBackend workflowsBubble migrationOption sets

How Relis Extracts Privacy Rules

Relis automatically extracts every privacy rule from your Bubble application — including conditions, field restrictions, and role checks — and documents them as structured authorization specs your engineering team can implement directly in the target stack.