Description
The Database Settings UI only shows the default userId option in the Ownership Field dropdown, even when the selected collection's model contains valid string fields such as ownerId or createdBy.
This appears to be a client-side filtering bug. The backend already supports arbitrary owner fields.
Steps to Reproduce
- Go to Dashboard → Database.
- Select a collection whose model contains a string field (e.g.,
ownerId).
- Navigate to Settings → Row-Level Security (RLS).
- Enable RLS.
- Open the Ownership Field dropdown.
Expected Behavior
The Ownership Field dropdown should list all string fields defined in the collection model, allowing administrators to select an existing schema field such as:
ownerId
createdBy
- Other string-based ownership fields
Actual Behavior
The dropdown only displays:
Custom schema fields are not shown.
Root Cause
The client code filters model fields using:
Why This Matters
Row-Level Security (RLS) supports any owner field, and the backend already validates that the configured owner field exists in the collection schema.
The broken UI prevents administrators from selecting valid schema fields and effectively forces them to use the default userId field or rely on workarounds.
Relevant Backend References
Project.js — RLS ownerField default and storage
project.controller.js — validation that ownerField exists in the collection schema
authorizeReadOperation.js — runtime use of the configured owner field
Description
The Database Settings UI only shows the default
userIdoption in the Ownership Field dropdown, even when the selected collection's model contains valid string fields such asownerIdorcreatedBy.This appears to be a client-side filtering bug. The backend already supports arbitrary owner fields.
Steps to Reproduce
ownerId).Expected Behavior
The Ownership Field dropdown should list all string fields defined in the collection model, allowing administrators to select an existing schema field such as:
ownerIdcreatedByActual Behavior
The dropdown only displays:
userId(Default)Custom schema fields are not shown.
Root Cause
The client code filters model fields using:
Why This Matters
Row-Level Security (RLS) supports any owner field, and the backend already validates that the configured owner field exists in the collection schema.
The broken UI prevents administrators from selecting valid schema fields and effectively forces them to use the default userId field or rely on workarounds.
Relevant Backend References
Project.js — RLS ownerField default and storage
project.controller.js — validation that ownerField exists in the collection schema
authorizeReadOperation.js — runtime use of the configured owner field