Do I need a separate admin app?

I have built admin and client apps before.

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.

Help appreciated!

You can use a roles setup to achieve the same thing inside an app.

Thanks, yes I’m familiar with that functionality.

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.

K, obviously I need to try it :slight_smile:

So if I log in as admin role I can view data that has a row owner that isn’t me, if I use rowID rather than email?

Yeah, but on the records table, you should set the “Admin” column to row owner as well (you can set multiple columns as row owner).

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 :frowning:

Thanks again Thinh :slight_smile:
I believe you’re referring to the same thing as this article (perhaps).

Which I browsed and didn’t 100% understand :joy: :cry:

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).

@blairrorani - the below might help. It provides some examples and explains how they work.

3 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.