
I'm wondering:
Is it possible to block a document create from a server function that is subscribed to the create event?
As means of an additional layer of security?
For my use case it would be to prevent muted users from sending messages during their mute period.

Like a middleware-function? That will be cool but as of now Appwrite function can't go in between some processes.
What you can do now:
- Change permission to a collection - by specific roles for example.
- Delete them right away - this is probably not what you've been looking for.


i typically prevent creation via the API and expose a function to create the document. the function can do any validation and only create the document if validation passes

Okay, makes sense, thanks guys 🙂

create 2 fx. make one for validation and other whatever you like. second fx tigger validation fx and validation fx trigger doc. creation
Recommended threads
- Error 1.7.4 console team no found
In console when i go to auth, select user, select a membership the url not work. Only work searching the team. It is by the region. project-default- and i get ...
- functions of 1.4 not work on 1.7
Hi, i updated of 1.4 to 1.7 but the function not work i get it error. Do I need to build and deploy the functions again?
- Login Error 500
Hey i have that Problem, i upgrade to the latest version and now i have this error but only on my custom domain not the main domain.. when i try to login
