How can I set permissions for create_operations()? What even is the correct way to use permissions in Python (using SDK version 13.4.1) ? In my cloud function creating a table works and sets the correct permissions:
database_id,
table_id=user_id,
name=user_name,
permissions=[
Permission.read(Role.user(user_id)),
Permission.write(Role.user(user_id)),
],
)```
but subsequently using `create_operations()` creates a row but does not see any permissions:
tablesDB.create_operations( transaction_id=transaction_id["$id"], operations=[ { "action": "create", "databaseId": userDB_id, "tableId": os.environ["POLICY_COLL_ID"], "rowId": f"{user_id}-policy", "data": { "acceptedTimestamp": datetime_truncated }, "permissions": [ Permission.read(Role.user(user_id)), Permission.write(Role.user(user_id)), ], }, ) ```
I realize this may be an older syntax since I can see this example in the docs at https://appwrite.io/docs/references/cloud/server-python/tablesDB:
result = tables_db.create_table(
database_id = '<DATABASE_ID>',
table_id = '<TABLE_ID>',
name = '<NAME>',
permissions = ["read("any")"], # optional
row_security = False, # optional
enabled = False # optional
)
Recommended threads
- Bug Report: type generation for enum of ...
### 👟 Reproduction steps in the enum element value, instead of English, use another language (Khmer), in my case Khmer text. ``` export enum ProvinceType { ...
- Github Repos are not appearing on sites ...
Hi, Has anyone had recent issues with sites feature where github repos are not appearing? I even tried unliking and giving it a shot! It does not even show up, ...
- Invalid document structure: Unknown attr...
Hello. I have self hosted instance running on my server and has valid endpoint and most of things are working as should. Installation is fresh install of versio...