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
- Function domain not available
Hello, even tho in docs you clearly describe that every function has its domain, I can not see it anywhere in any of my projects. How do I reveal the url of th...
- Inquiry: How to Reduce Cold Start Durati...
Hey! I was using Python for the function runtime, but after reading that Go has the fastest runtime, I switched my code over to Go. However, I'm still seeing co...
- After a GET request is passed to functio...
Create execution in the console can normally retrieve the get parameters。WHy?