Back

Is there a way to prevent user updating their preferences?

  • 0
  • Web
  • Cloud
Adanalee01
14 Jan, 2025, 10:08

I want to store some user data in the preferences. However, I don't want users to be able to modify it by directly querying the API. Basically, I want user preferences to be editable only by the server, not the client. Is there a way to achieve this, and should I rely on this approach, or would it be better to create a separate database for this purpose?

TL;DR
Developers want to prevent users from updating preferences directly. They can achieve this by creating a new collection with read permission only, then managing edits through a server SDK or server SDK + function. This ensures user data in preferences is editable only by the server, not the client. Another option is to consider creating a separate database for this purpose.
Darshan Pandya
14 Jan, 2025, 10:11

Every user can edit their own preferences. If you don't to allow that, create a new collection and allow read permission to it. edit it via a server sdk or server sdk + function.

Adanalee01
14 Jan, 2025, 10:12

Thanks

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more