To make Bubble clients see only their own data, give every private record a field pointing to the client's account, then add a privacy rule per data type, such as "This Invoice's Family is Current User's Family", that grants searching and viewing. Add a staff rule, untick every box on Everyone else, and test logged in as two different clients.
The Complete Excel Course with AI Integration
From formulas and pivot tables to Power Query, DAX, VBA and AI with Copilot, ChatGPT and Claude — hands-on from the first lesson.
By Sagnik Bhattacharya and Virginia Thorn, Primetime Emmy Award winner
Buy nowFiltering a list is not the same as protecting it. A repeating group that searches for invoices where Family = Current User's Family looks private on screen, yet if the Invoice type has no privacy rule, Bubble's own editor labels it "Publicly visible": the filter decides what the page shows, not what the server will hand over. Bubble's manual is plain about the mechanism. Rules are checked on the server, anything that reaches the browser can be read whether or not it is displayed, and Bubble downloads every field of a record the rules allow, even when your page shows only the invoice number.
What field does every private record need for Bubble privacy rules?
Every private record needs a field holding the client's account, because a Bubble privacy rule reads fields on the record being requested and fields on the person asking for it. Client separation works when both sides carry the same value. The record says which client account it belongs to, the user says which client account they belong to, and the rule compares the two.
The trap is reaching that value through a chain. Bubble's manual warns that a rule cannot follow relationships more than one level deep to grant search access. "This Daily Report's Child's Family is Current User's Family" goes two levels (report to child, child to family), so a parent searching for reports gets nothing back. The fix the manual describes is structural: arrange your data so the privacy check reaches only one level. In practice, put a Family (or Client, or Account) field directly on every private data type, even when the record could already reach it through another link.
Here is the model I would use for a childcare nursery's parent portal. Picture 42 families, 9 staff and a portal showing daily reports with photos, monthly invoices and medicine-consent forms (illustrative figures throughout).
| Data type | Fields that matter | Account link | Who should see it |
|---|---|---|---|
| User | Name, Email, Staff (yes/no, default no), Family | Family (blank for staff) | Each parent their own record; parents see staff names only |
| Family | Family name, Billing email, Balance, Notes for staff | Itself | Its own parents; all staff |
| Child | First name, Room, Allergies, Safeguarding note | Family | Its parents, except the safeguarding note; all staff |
| Daily Report | Child, Family, Date, Meals, Sleep, Photos, Key worker's private note | Family | Its parents, except the private note; all staff |
| Invoice | Family, Month, Amount, Status, PDF, Internal note | Family | Its parents, except the internal note; all staff |
| Medicine Consent | Child, Family, Medicine, Dose, Signed by, Signed on | Family | Its parents; all staff |
Two choices in that table save trouble later. The Staff field is a yes/no with a default of no, the same pattern Bubble's own shopping-cart example uses for admins, so a new sign-up can never start life as staff. And the Daily Report carries both Child and Family: the workflow that creates a report copies the child's family across once, so the privacy rule never has to walk the chain. If you are still deciding whether Bubble is the right home for the portal at all, the trade-offs are laid out in Softr vs Bubble for a client portal.
How do you write Bubble privacy rules for each data type?
Write Bubble privacy rules in the Data tab under Privacy, one data type at a time, starting with every type labelled "Publicly visible". The left panel lists every data type with one of two labels, "Privacy rules applied" or "Publicly visible". On a portal that was built quickly, perhaps from a description with Bubble's AI app builder, most types will say Publicly visible, and that list is your to-do list. For each private type:
- Select the type and click New rule. Name it after who it covers, for example "Parent: own family".
- In the When field, build the condition. For invoices: This Invoice's Family is Current User's Family.
- Set the record-level permissions. Tick Find this in searches so the parent's invoice list works, and tick View files attached to this so the invoice PDF opens. Bubble's reference pages call the second one View attached files; it is the same setting.
- Set the field permissions. Each field has three checkboxes: View, Constraint (whether the field can be used as a search filter) and Auto-bind (whether an input bound to the field can change it). For parents: View on everything except Internal note; Constraint only on Family, Month and Status, the fields your invoice page filters by; Auto-bind on nothing.
- Add a second rule, "Staff: everything", with the condition Current User's Staff is yes, and tick every box.
- Find the Everyone else rule at the bottom and untick every box.
Rules add up rather than cancel out. Bubble's manual puts it as "you don't prohibit access, you grant it": a user gets the combined permissions of every rule they match, not the strictest one. That is why the Everyone else rule matters most. Anything ticked there is granted to every visitor who matches no other rule, including people who are not logged in, so a single tick there undoes the separation the rules above it create.
The finished rule sheet for the nursery
| Data type | Rule name | When | Searches | Files | Fields hidden | Auto-bind |
|---|---|---|---|---|---|---|
| Family | Parent: own family | This Family is Current User's Family | Yes | No | Notes for staff | None |
| Child | Parent: own children | This Child's Family is Current User's Family | Yes | Yes | Safeguarding note | None |
| Daily Report | Parent: own reports | This Daily Report's Family is Current User's Family | Yes | Yes | Key worker's private note | None |
| Invoice | Parent: own invoices | This Invoice's Family is Current User's Family | Yes | Yes | Internal note | None |
| Medicine Consent | Parent: own forms | This Medicine Consent's Family is Current User's Family | Yes | Yes | None | None |
| User | Self | This User is Current User | Yes | Yes | None | Name only |
| User | Staff names | This User's Staff is yes | Yes | No | Everything except Name | None |
Every type also gets "Staff: everything" (Current User's Staff is yes, all boxes ticked) and an Everyone else rule with nothing ticked. That is 13 rules plus six Everyone else rules for a six-type portal: an hour or two of careful clicking, not a week.
The second User rule deserves a sentence of its own. Parents need to see their key worker's name on a daily report, which means they must be able to view some fields of staff User records. Granting View on Name alone, with Email, Family and Staff hidden, gives them exactly that. Without it, the key worker line on every report comes up blank, and the tempting quick fix is to tick every View box on Everyone else for the User type, which hands every staff email address to anyone who visits.
How do you keep private files private in Bubble?
Keeping a file private in Bubble takes two settings, not one, because hiding the field that holds the file's URL hides the link without protecting the file. Invoice PDFs, report photos and signed forms are where portals most often leak, because a file is not stored in the record. Bubble's Files article explains that a file field holds only a URL pointing to the file on a storage server, and that the URL is live for anyone who has it from the moment the upload finishes, before your workflow has even saved it to a record.
Protection needs both halves:
- On the uploader element: tick Make this file private, then set Attach this file to (for a report photo, Current page's Daily Report). Attaching is what ties the file to a record whose rules can govern it.
- On that record's data type: make sure View files attached to this is unticked on Everyone else and ticked only on the rules that should open the file.
With both in place, someone who has the URL but does not match a rule gets an error instead of the file. Two related details catch people out. Files uploaded through the editor's file manager or the database editor are never protected by privacy rules, so a batch of old invoices dragged in by hand during setup is public. And clearing a file field removes only the URL; the file stays reachable by anyone holding the link until you run the Delete an uploaded file action, which has to run before you clear the field, because it needs the URL to find the file.
A veterinary practice's owner portal shows the difference. Before: a vet uploads a lab result PDF through a file uploader with default settings and a workflow saves the URL to the Pet's Lab results field. A receptionist pastes the link into the wrong owner's email by mistake, and that owner can open another family's results. After: the uploader has Make this file private ticked and attaches the file to a Lab Result record carrying an Owner Account field; the rule "This Lab Result's Owner Account is Current User's Owner Account" grants View files attached to this, and Everyone else grants nothing. The same misdirected link now shows an error to anyone not logged in as that owner. The email mistake still happened; it just stopped being a data leak.
How do you test Bubble privacy rules with two logins?
Test Bubble privacy rules by building one throwaway page that asks for everything and running it as different people. Your real pages are a poor test of privacy rules because they already filter. If the invoice page searches only for the current family's invoices, a missing rule never shows up there.
- Seed two obviously fake families in the development database. Test Family A: two children, three invoices, four daily reports with photos. Test Family B: one child, two invoices, two reports. Add one parent user to each and one test staff user.
- Build a page called privacy-check. Give it one repeating group per private data type, each doing a search with no constraints at all, and show every field in each row, including the staff-only notes and a link to each file.
- Run as Parent A. In Data, App Data, select the User type; a Run as link sits in the left-most column of each user row. Open privacy-check. Expected: Family A's records only, staff-only fields blank, Family A's files opening.
- Run as Parent B and repeat. Expected: the mirror image.
- Run as the staff user. Expected: everything from both families.
- Log out and open privacy-check in a private browser window. Expected: empty groups.
- Try a borrowed link. While running as staff, copy the URL of one of Family B's photos; then, running as Parent A, paste it into the address bar. Expected: an error, not the photo.
- Try a borrowed record. If your invoice page takes its invoice from the URL, open one of Family B's invoice addresses while running as Parent A. Expected: an empty page.
Bubble's previewing guide notes you can also run as a user against the live database, after switching the database view to live with the link in the upper-right corner of the screen, which is useful after launch. Treat that with care: you are looking at real families' data.
Here is what a first run might record for the nursery (illustrative results):
| Check | Running as | Expected | Result | Fix applied |
|---|---|---|---|---|
| Invoices group | Parent A | 3 invoices, notes blank | 3 invoices, Internal note visible | Unticked View on Internal note in the parent rule |
| Invoices group | Parent B | 2 invoices | 2 invoices | None |
| Daily reports group | Parent A | 4 reports | 0 reports | Rule used Child's Family; added Family field to Daily Report |
| Photo link from B | Parent A | Error | Photo opened | Uploader lacked Make this file private; re-uploaded test photos |
| Message group | Logged out | Empty | 12 messages | Message type had no rules; added parent, staff and Everyone else rules |
| All groups | Staff | Everything | Everything | None |
The sum for budgeting your time: six private data types checked under four identities (Parent A, Parent B, staff, logged out) is 24 checks, plus the file and URL tests, so roughly 30 checks at a minute or two each. Under an hour, and repeatable every time the portal changes. When everything passes, delete privacy-check or put it behind the staff rule before going live.
For a second opinion, Bubble's security dashboard includes a privacy rules checker that reviews every data type for fields left publicly accessible. Its manual page warns that the check needs data: each type should hold sample records for the visibility check to return meaningful results, which is one more reason to seed the test families first. Privacy rules themselves come with every plan, Free included, according to Bubble's plan comparison; the security tests do not: the same table shows none on Free, five basic tests on Starter, and unlimited basic and advanced tests from Growth upwards.
How do client records still leak after privacy rules exist?
Client records still leak after rules exist mostly because leaks creep in as the portal grows, not because rules were missing on day one. Six patterns are worth looking for, each with how it tends to show up.
1. A data type added in month three
The portal launches with tight rules, then someone adds a Message type so parents can write to their key worker. Nobody revisits Privacy, so Message sits at Publicly visible. It shows up only if someone runs the greedy page again, which is the argument for rerunning it after every new type.
2. The two-level rule "fixed" by opening Everyone else
This one follows directly from the chain problem. A builder writes "This Daily Report's Child's Family is Current User's Family", parents see an empty report list, and under pressure from a complaining parent someone ticks Find this in searches on Everyone else. The list fills up again, for every family. Before: condition two levels deep, Everyone else open. After: a Family field on Daily Report, filled on existing reports once with a backend workflow run over the list, the condition rewritten as "This Daily Report's Family is Current User's Family", and Everyone else closed.
3. Staff notes stored on the client's own user record
Bubble's client-side article states that all fields stored on the current user are downloaded when a page loads, regardless of how the app is set up. A care agency that adds an Internal risk note field to each client's User record has handed that note to the client's browser. Put staff-only notes on a separate data type with its own staff rule.
4. Something sensitive in an option set
Option sets are handy for fixed lists such as rooms, invoice statuses or lesson grades. Bubble's option sets page says they are included in the JavaScript sent to every visitor and are not covered by privacy rules at all, and that they should never hold sensitive information. A music school that keeps teachers' personal mobile numbers as an attribute on a Teacher option set has published them.
5. Auto-bind or a workflow that lets a client change their own Family
Privacy rules control viewing; Bubble's manual is explicit that unticking View does not stop a workflow from changing a field. If a profile form auto-binds every User field, or a Save button's workflow copies a dropdown into Current User's Family, a parent could attach themselves to another family and inherit its records through your perfectly written rules. Keep Auto-bind off on Family and Staff, and add an Only when condition to any workflow that touches them (Current User's Staff is yes).
6. A page left open after access changes
The manual cautions that rules do not re-apply to an open page when the rules affecting a user change. When a family leaves and staff clear the parent's Family field, a tab the parent left open keeps showing what it had already loaded until it is refreshed. For a tense departure, log the user out as part of the leaving workflow rather than relying on the next reload.
If you want help fitting this into how your portal actually runs, I offer one-to-one AI consultations for small businesses.
Can clients guess hidden values through Bubble searches?
Clients can sometimes infer a hidden value in Bubble if they can find records but cannot view a field, because they may still filter by that field and the records that come back reveal the value. This subtler leak survives correct View settings. Bubble's manual calls it inference, using the example of a salary field searched with Salary > 100,000.
A music school makes it concrete. Parents of an ensemble can see the ensemble roster (names and instruments) because the portal shows who plays in each group. The Exam grade field is hidden from parents. If Constraint is allowed on Exam grade, a parent who knows how to run a search can ask for ensemble members where Exam grade is Distinction, then Merit, then Pass, and rebuild everyone's results without ever seeing the field.
Bubble's answer is the search privacy mode, set in the Settings tab under General, per branch:
- Off: any field can be used as a search filter. Bubble recommends it only for apps with no private data.
- Automatic: filters already defined on your pages and workflows still work; anything else needs the field's Constraint permission. Data API searches always need explicit permission.
- Strict: every filter needs explicit permission in the privacy rule. Bubble recommends it for apps that search sensitive data.
For a client portal, Strict is the setting to work towards. It breaks any search whose filter field you have not allowed, so switch it on in development first. Bubble's own transition checklist: list every field where Constraint is unticked, search the app for each one with the Uses constraint field filter, and either allow the constraint, filter on a different field or restructure the data. One field you cannot lock is the slug: Bubble keeps slugs searchable by design, so never put anything sensitive in one.
Do backend workflows and the Data API skip Bubble privacy rules?
Yes, two Bubble features bypass privacy rules by design, and both are fine when you know they are doing so.
The first is an API workflow with Ignore privacy rules when running the workflow ticked. Bubble's manual describes it for jobs that need full data access without opening that access to the current user, such as a nightly workflow that totals every family's unpaid balance for the manager's dashboard. It runs on the server where users cannot see it. The risk is in what you send back: if that workflow writes all 42 families' balances into a record the parents' rule can read, you have rebuilt the leak by hand.
The second is the Data API. Bubble's Data API privacy page says access to a data type through the API follows that type's privacy rules, with one exception: a client authenticated with a Bubble API token gets admin access and every rule is disregarded. So the token you paste into an automation tool to sync invoices sees every family. Keep tokens in the fewest places possible, prefer user-authenticated access where an integration allows it, and note that Create via API, Modify via API and Delete via API are unticked by default, which is the right starting point.
How can an AI assistant draft a Bubble privacy rule sheet?
An AI assistant can draft a Bubble rule sheet by turning a list of data types and fields into a first-draft matrix that you then correct. A care agency with a family portal might paste its field list into ChatGPT or Claude like this:
I run a home care agency and I'm building a family portal in Bubble.
Below are my data types and fields. Families should see only their own
relative's records. Carers should see only clients on their rota.
Managers see everything.
For each data type, draft Bubble privacy rules as a table:
rule name | When condition | Find in searches | View files | fields hidden | Auto-bind.
Rules must compare ONE field on the record with ONE field on Current User
(no chains like This Visit's Client's Account). Flag any field that looks
sensitive and any place where I need to add a field to avoid a chain.
Data types:
User: Name, Email, Role (Family / Carer / Manager), Client Account
Client Account: Name, Address, Funding type, Manager notes
Visit: Client Account, Carer (User), Date, Tasks done, Visit notes, Incident flag
Care Plan: Client Account, Version, PDF, Risk assessment notes
Invoice: Client Account, Period, Hours, Amount, Status
An illustrative extract of what comes back:
Visit | Family: own relative | This Visit's Client Account is Current User's
Client Account | Yes | No | Incident flag | None
Visit | Carer: own visits | This Visit's Carer is Current User | Yes | No | None | Tasks done, Visit notes
Care Plan | Family: own plan | This Care Plan's Client Account's Name is Current
User's Client Account's Name | Yes | Yes | Risk assessment notes | None
Everyone else: (not listed)
Note: consider hiding the Slug field from searches on every type.
Four corrections before any of that goes into Bubble. The Care Plan condition compares names through two levels on each side; rewrite it as This Care Plan's Client Account is Current User's Client Account, which also stops two clients who share a surname from matching. The Everyone else rules are missing entirely, and they decide what strangers see. The slug advice is impossible, because Bubble does not let you remove the Constraint permission on slug fields. And the carer rule only covers visits where the carer is named, so a carer covering a colleague's round will see nothing; decide whether that is correct before a Sunday morning call proves it is not. The Role field also needs Auto-bind off and an Only when condition on any workflow that changes it, which the draft never mentions.
Used this way the assistant saves typing, not thinking. The rules still get written by hand in Data, Privacy, and they still face the greedy-page test.
When should you re-check Bubble privacy rules?
Re-check Bubble privacy rules whenever the portal changes, because privacy rules are not a launch task you tick off once. Rerun the two-login test whenever one of these happens, and keep the filled-in test log in the same folder as your portal notes:
- A new data type is created (it starts with no rules).
- A new field is added to a private type (check whether parents should view it, filter by it or auto-bind it).
- A new page searches a private type, or an existing search gains a filter (Strict mode may need a Constraint permission).
- A new uploader is added anywhere (check Make this file private and the attachment).
- A new integration gets an API token or a backend workflow starts ignoring privacy rules.
- A family, carer or member of staff leaves.
The wider launch checks, from login settings to backups, are covered in the security checklist for apps before customers use them. If the portal holds health, safeguarding or financial records and nobody on your team has written privacy rules before, a paid review is cheap insurance; what a Bubble developer costs and what the brief must cover explains how to scope one so it includes the test log, not just the rules. The manual's full reference is on Bubble's privacy rules page, and the file settings on its Files page.
If you keep the rule sheet and test log in a spreadsheet, try The Complete Excel Course with AI Integration on Coding Liquids.
Further reads
- Bubble Workload Units: Why Bills Spike and How to Cap Them — Keep the portal's monthly Bubble bill under control once clients use it.
- Bubble Pricing: Starter, Growth and Team Plans and Workload Units — Which Bubble plan a live client portal needs, and what each includes.
- Bubble vs Lovable: Which Should a Small Business Use? — Weigh Bubble against Lovable before you commit a portal to either.
- Airtable Client Portal: Portals Add-On, Softr or Glide? — Portal routes for firms whose client data already lives in Airtable.
Browse all AI-for-business tutorials
Sources: Bubble manual pages on protecting data with privacy rules, the Privacy core reference, Files, Client-side and server-side, Option sets, Data API privacy rules, Previewing your app and the security dashboard's privacy rules checker; Bubble pricing page. All read 17 November 2026.
