Dev.to AI 🤖 Ai 👁 0 📖 4 min read

Base44 users can see other people's data? Fix the data permissions

You open your Base44 app as a test user and the list shows everyone's orders. Or the dashboard shows a Permission risks detected banner you've been ignoring. Either way, the problem is the same: a table's permissions let

You open your Base44 app as a test user and the list shows everyone's orders. Or the dashboard shows a Permission risks detected banner you've been ignoring. Either way, the problem is the same: a table's permissions let more people read it than you meant.

It's the first thing I look for when I check a Base44 app before launch, and it's usually a settings fix, not a rebuild. Here's why it happens and how I fix it.

What you might be seeing

  • A Permission risks detected banner on a data table
  • Users can see all records, not just their own
  • Data that should be private is visible to everyone, sometimes even without signing in

Why it happens

  • Read is set to All Users. In Base44, All Users means anyone can perform the action, even without signing in. That's right for a product catalogue. It's wrong for orders, messages or form submissions.
  • A broad rule wins. A person who matches any one rule gets access. So an extra rule you added for admins or for a team can quietly open the table to more people than you intended.
  • The comparison uses the wrong field. An Entity-User Field Comparison that compares something users type freely (a team name, say), rather than the creator or an assigned email, lets people grant themselves access.
  • A backend function reads as the service role. Code using asServiceRole skips every permission rule. Base44's developer docs say it bypasses both row-level and field-level security, and that your function is responsible for its own access checks.

Find the cause first

Before changing anything, spend ten minutes looking:

  1. Open Dashboard > Data, click each table, and look for the warning icon on the Permissions button.
  2. Read the rules for Read, Update and Delete on every table that holds personal or business data.
  3. Click Test Permissions in preview and act as an ordinary user. Check what the lists and detail pages show.
  4. Search your backend functions for asServiceRole and note which ones return data to the browser.

Fix 1: Lock private tables to their owner

  1. On the table's Permissions page, click Edit.
  2. Set Creator Only on Read, Update and Delete for personal data such as orders, messages and submissions.
  3. Keep Create on All Users only where people outside the app must be able to submit, like a contact form.
  4. Click Save. If a risk banner is still shown, run the Permission recommendations.

Fix 2: Share records with the right people only

Not every table is "only the creator". For the others:

  • For records assigned to someone, use Entity-User Field Comparison, for example Entity field assigned_to and User field email.
  • For admin-only actions, add a User Property Check on User Role equal to Admin.

If you work in the developer schema, the same rules look like this:

"rls": {
  "create": true,
  "read": { "$or": [
    { "created_by": "{{user.email}}" },
    { "user_condition": { "role": "admin" } }
  ] },
  "update": { "created_by": "{{user.email}}" },
  "delete": { "user_condition": { "role": "admin" } }
}

Read it as: anyone can create; you can read your own records and admins can read all; you can update your own; only admins delete.

Fix 3: Check service-role functions yourself

This is the one people miss, because the table rules look perfect and data still leaks.

  • In every backend function that uses asServiceRole, read the signed-in user first and filter by them before returning records.
  • Return only the fields the screen needs, not the whole record.

Check the fix worked

  • Act as user A in Test Permissions in preview: only A's records appear.
  • Act as user B: A's records don't appear, and opening one of them by its link shows not found.
  • Open the app signed out: private tables show nothing.
  • Run the Base44 security scan and confirm no permission findings remain.

One thing that confuses people: when a read is denied, Base44 treats it as if the data doesn't exist. Lists come back empty and opening a record returns not found. That protects the data, but it can look like a bug, so don't "fix" it by loosening the rule again.

Stop it coming back

  • Tell the AI chat in plain words who should see each table, and review the rules it proposes before approving them.
  • Run the security scan before every publish that adds a table or a role.
  • Test with sample people, not real accounts: changes you make while testing are saved to that person's data.

Quick answers

Does the Base44 security scan catch this? It flags permission risks and can apply recommended rules in one click. It can't know your business rules, so test as each kind of user afterwards.

My app has teams, companies and several roles. Is Creator Only enough? Usually not. At that point permissions need a design, not a patch: decide who owns each record and who may see it, then write and test the rules for each role.

Sources: Base44: Managing data permissions and Base44 developer docs: Entity security.

I keep the full checklist, with related Base44 fixes for empty lists, custom domains and backend function errors, on our fix page. If you'd like a second pair of eyes, our free AI-built app audit lists what's broken in your code, with the file and line.

I wrote this with AI assistance and reviewed it myself.

📰 Read the original article on Dev.to AI

Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.