In client app the user is the row owner.
In the admin app there is no row owner. This allows admins to view and edit any data because the row owner isn’t preventing the admin’s access to the data.
Is there a way to achieve the same thing in a single app?
I’ve assumed that row ownership belonging to the user would prevent an admin from seeing all records.
How do row owner settings affect that though? If I log in as admin, won’t I just see my own data, and not data from all the users (that I want to see)?
You can have both row owners and roles setup in tandem.
Say you have a table where you store records that should all be visible to admins, but gated to a specific user based on a rowID.
You can have a rowID to store the ID of the user who needs to see that record, and another column where you just store the string “Admin”, providing that’s the role you set up in the Users table.
I know how to set a row owner, just not 100% sure what you’re suggesting.
Example:
Workouts table.
Has a date and a user (logged in user’s email) and a score.
As the row owner, this user will only be able to create, view and edit their scores even though all users are recording scores.
when admin logs in to same app, they will see their data only (based on my current set up).
I’m not sure what the “Admin” column will be in my app.
Is there a link or screenshot you can share? Sorry to be a pain
The Admin column is simply a column that is set as a Row Owner column and has the word ‘Admin’ in every row (or whatever word matches what you set as the admin Role in the user table).