Can a role be "read only?"

Is it possible to set a role to be one that has read-only access to the data? In my use case, the primary user shares his/her information with a second user (essentially allowing the second user to run the app as the second user is tagged as row owner on the primary user’s data). It would be nice to tag the second user as a row owner (done) and also make its role one that is read-only. Any ideas appreciated.

Are you using a Private Pro app?

You could take advantage of the Roles capability.

  • Assign your second user a role, let’s call it “Impersonator”
  • Then use that to control editing, ie. “allow edit where owner is signed-in user and role is not impersonator”

Yes, Private Pro. Will try your solution. Thank you

Your logic is sound but I am running into a problem with row owners. In the app, the primary user stores personal info (eg, allergies). When a record is created by the primary (eg, a new allergy added), I am making the primary and secondary users row owners.

When the primary wants to share the data with a secondary user, the secondary user should be read-only. I am able to have the secondary user login and see the primary user’s data, but the logic you gave me does not kick the secondary to read only, The app behaves as if the primary is logged in. Any additional thoughts? Thank you for this and all of your previous help with scripts.

You could use tab visibility to create duplicate tabs that are read only for the second user.

1 Like

Got it to work. Thank you Robert for this and all of the other help you have provided along the way.

I wound up using a combination of the recommendations from Robert and Darren.

1 Like