Hi there. Is there a way to set the function permission within the function itself or in the JSON file?
The problem: I am having to set permissions for the function in the console every time I redeploy the function via the CLI " appwrite deploy function" command. Is there a way to set it before deploying it via CLI?
Thanks in advance
Hi 👋 In appwrite.json, there is functions key and in your function definiton there you can find execute array of permissions. Once set there, those will be applied on every redeploy
Here is an example: https://github.com/Meldiron/almost-wishlist/blob/main/appwrite.json#L71
Possible value is for example any, users, guests, ..
Thank you. I will definately check this out.
@Meldiron Thank you. I got it. I just had to set the execute attribute in the function section of my appwrite.json to this "execute": ["users"]
Great job ✨
[SOLVED] Set function permissions before deploying
Recommended threads
- Timed out waiting for runtime error
execution id 6a3e0791978712d81ee0 im having issue with appwrite function runtime performance. even after 4gbram and cpu same function sometimes completes in a...
- Function crash first run after a while
Big issue I’m facing , almost all functions crash or run for a very long time the first time i run them after a long time without running them I have a “help-c...
- Function global variables
when i create a top-level global variable in go or bun how will it behave? is the heap getting renewed on every execution or could i do some kind of temp. cachi...