appwrite / sdk-for-cli

[READ-ONLY] Official Appwrite CLI >_
BSD 3-Clause "New" or "Revised" License
85 stars 28 forks source link

πŸ› Bug Report: Deploy Python function doesn't work because of roles #55

Closed netapy closed 1 year ago

netapy commented 1 year ago

πŸ‘Ÿ Reproduction steps

  1. create a python 3.9 function using permissions and roles
    permissions=[
    Permission.read(
        Role.user(req.env.get('APPWRITE_FUNCTION_USER_ID'))),
    Permission.update(
        Role.user(req.env.get('APPWRITE_FUNCTION_USER_ID'))),
    Permission.delete(
        Role.user(req.env.get('APPWRITE_FUNCTION_USER_ID')))
    ]
  2. appwrite deploy function
  3. select "MyAwesomeFunction"
  4. Error appears :
    β„Ή Info Deploying function game_post ( myAwesomeFunction )
    βœ— Error Invalid execute: Roles using the "role:" prefix have been removed. Use "users", "guests", or "any" instead.

πŸ‘ Expected behavior

It should deploy my function normally to my appwrite server.

πŸ‘Ž Actual Behavior

Error appears :

β„Ή Info Deploying function game_post ( myAwesomeFunction )
βœ— Error Invalid execute: Roles using the "role:" prefix have been removed. Use "users", "guests", or "any" instead.

🎲 Appwrite version

Different version (specify in environment)

πŸ’» Operating system

Windows

🧱 Your Environment

Appwrite 1.0.1.500 Appwrite-cli 1.0.0 Python Appwrite Sdk 1.0.0

πŸ‘€ Have you spent some time to check if this issue has been raised before?

🏒 Have you read the Code of Conduct?

netapy commented 1 year ago

Sorry, I forgot to change the array "execute" of my function in the appwrite.json file ("role:all to "users"). All clear !