Help! Users deleting records of other users

Hey guys. I have tables that users can add records to, where all the data they add is specific to themselves. The problem is when a user deletes the record, they delete that row for ALL users. How do I keep this from happening?

Use Row Owners instead of User Specific columns.

Ok so I set the row owner to be a user name or email? And then do I not make the other fields user specific?

Row Owner should be the Users email address.

Normally you won’t need any User Specific columns where you are using Row Owners.
But it just depends - there are cases where you might want to use them, I have no way of knowing if your case is one. Probably not.

Ok, so if I’m the row owner, I can only delete the row I have made. That makes sense to me I think. Then in the app itself, I can set a filter to only show data where my email matches the email column, correct?

When you use row owners, you only have access to your own rows. The ones you “own”. No need to set a filter, because it’s already filtering out the unowned rows. In fact unowned rows aren’t even sent to the user’s device, so they won’t know they exist, and thus can’t delete them.

2 Likes