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
- Project in AppWrite Cloud doesn't allow ...
I have a collection where the data can't be opened. When I check the functions, there are three instances of a function still running that can't be deleted. The...
- Get team fail in appwrite function
I try to get team of a user inside appwrite function, but i get this error: `AppwriteException: User (role: guests) missing scope (teams.read)` If i try on cl...
- Function in Node.JS to monitor events ar...
Hello everyone. I'm creating my first Node.JS function, but I don't have much experience with node and javascript. I'm trying to create a function, that monito...