
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
- [Node.js SDK] Bypass 2GB file limit?
Hello. Using either InputFile.fromPath or InputFile.fromBuffer throws this error: File size (2295467305) is greater than 2 GiB Bucket limit etc. is setup corre...
- Relationship null, even when relationshi...
Hi Everyone, im experiencing issues with set relation data. When im setting the document id from the related database most of them seem fine, except one table. ...
- REQUEST FAILED IN MIGRATION
I was trying to moved my archived project to a self-host database . Though the Project is "read only" but there's a message that I can view and migrate data to...
