Updating only storage permission

I am creating game where users can create and share content. When user wants to share their creation they should not be able to edit it anymore. I have split storing creations to meta and data so when listing other people’s creations actual data is not fetched.

I was thinking about setting both meta and data write permission to system only but I didn’t find a way to update only permissions. It feels stupid to read all the data just for updating permission. Should I use custom sql to do it or is there any other way?

Maybe I could also make custom rpc to save data and check from meta if creation is published.

Hello @devantti,

If you’d like to update the permissions of an object without having to read it first, custom SQL would be the best way to achieve it, however, we discourage the usage of raw SQL prematurely, consider reading the object and optimize later, if needed.

Ok, thanks! I will have to consider the options. Probably going to do it in authoritative way.