Back

Looking for ideas

  • 1
  • General
  • Databases
  • Web
Neo
6 Dec, 2023, 21:15

I have a perculiar problem and thinking of ideas, if you have any please let me know.

Using the web sdk on a client application (no servers) I have some collections that I want only users/verified role to be able to create. However, when a new user creates an account, I want to create a set of default collections.

Unfortunately i cannot do this if with the collection level role active. Since the created user (email provider) is not verified yet.

Any ideas on how I can create this default without removing this role? I thought about an admin function but I don't know if that makes sense exposed to a client app

TL;DR
The user is looking for ideas on how to create default collections in their client application using web SDK. They want only users with the 'users/verified' role to be able to create collections, but can't do so until the user's email is verified. They mentioned considering an admin function, but are unsure if it is the right solution.
Ernest
6 Dec, 2023, 23:05

A cloud function is your best bet since it can be triggered by events. The client doesn't need to directly call the function. https://appwrite.io/docs/products/functions/execution#events

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