Rank 2: Process
I'm not disputing the use of user cookies for authentication
Votes
0
Replies
24
Participants
Unknown
Messages
25
Rank 2: Process
I'm not disputing the use of user cookies for authentication
Moderator
Then what's the issue? 😅
Moderator
If you mean setting permissions, as said previously, you should use a function
Moderator
If that's the issue, yes, you can prevent people from creating documents by only giving read permissio
Moderator
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.
Rank 2: Process
I will yeah
Rank 2: Process
I presume functions requests to database completely override any permissions, like a super-user?
Rank 2: Process
Which means I can remove the user create permission?
Moderator
Yes, you need to set an API key in the function so they override permissions obviously
Moderator
Yes
Moderator
You only set permissions for the user to execute the function and nothing else
Moderator
Apart from read permission
Rank 2: Process
@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:
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".
Moderator
This latest ones depends on your use case too and preferences, but most times I prefer having separate/custom functions for each thing
Rank 2: Process
I just didn’t want to clog up my github with a bunch of repos but i guess we’ll see
Rank 2: Process
In my case, the functions would all relate to the same database and collection
Moderator
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
Moderator
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
Rank 2: Process
Ah okay, in the simplest form, I will be creating memos, editing them and deleting them. So perhaps one function may work.
Rank 2: Process
what’s the alternative to using GitHub?
Moderator
Yes, or just 3 will be enough, that's your choice 😄
Moderator
There will be just a very little difference, probably unnoticeable if handled properly
Rank 2: Process
Do you know about this? https://discord.com/channels/564160730845151244/1160903699078594631/1162029570518700204
Moderator
Cli deployment
Rank 2: Process
👍