I'm not disputing the use of user cookies for authentication
Then what's the issue? π
If you mean setting permissions, as said previously, you should use a function
If that's the issue, yes, you can prevent people from creating documents by only giving read permissio
Respect calls to a function, they're rate limited by default, but you could implement custom rate limits inside the function if you need even more strict limits.
I will yeah
I presume functions requests to database completely override any permissions, like a super-user?
Which means I can remove the user create permission?
Yes, you need to set an API key in the function so they override permissions obviously
Yes
You only set permissions for the user to execute the function and nothing else
Apart from read permission
@D5 Just a quick question, I might've already asked it but for my functions, what's the best conventions to use? For example, should I:
- Create a separate cloud function for creating documents, editing documents and deleting documents.
- Create one cloud function for all database queries.
And additionally, should I be setting up the functions just as the create document function works with the Appwrite API or, should I make it case-specific (e.g: have a function called "Create Memo" and only have arguments like "content" and "colour".
- Yes
- This depends on your needs
This latest ones depends on your use case too and preferences, but most times I prefer having separate/custom functions for each thing
I just didnβt want to clog up my github with a bunch of repos but i guess weβll see
In my case, the functions would all relate to the same database and collection
Of course you could handle everything with 1, but I think some cases it's not the most convenient approach mainly from a performance perspective. Also you don't need to use GitHub for functions.
As said, this is a bit complex topic since it depends more on your use case and specific needs
Maybe in your case it's 100% fine using the same function. If you're going to do the same or almost the same kind of thing or requests, but for example, with different parameters, then you will be fine with 1. However if you're going to do multiple and different things, then it's better multiple
Ah okay, in the simplest form, I will be creating memos, editing them and deleting them. So perhaps one function may work.
whatβs the alternative to using GitHub?
Yes, or just 3 will be enough, that's your choice π
There will be just a very little difference, probably unnoticeable if handled properly
Do you know about this? https://discord.com/channels/564160730845151244/1160903699078594631/1162029570518700204
Cli deployment
π
Recommended threads
- Update User Error
```ts const { users, databases } = await createAdminClient(); const session = await getLoggedInUser(); const user = await users.get(session.$id); if (!use...
- apple exchange code to token
hello guys, im new here π I have created a project and enabled apple oauth, filled all data (client id, key id, p8 file itself etc). I generate oauth code form...
- Our Appwrite organization is suspended
Please give support regarding this , no app is working now , please solve my issue and give support , no one is replying in message section or email.