Assign user automatically to created entity
Hi I am struggling with following scenario:
I have table
1) User should not be able to set
2) Each time a new message is created I would like to assign
What's the right technique to get it done?
I have table
messages - simple one
message: textandauthor_id: ref-to-user
1) User should not be able to set
author_id manually to any message. I think this can be done with RLS, right?2) Each time a new message is created I would like to assign
author_id value equal to auth.uuid().What's the right technique to get it done?