
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
- Cannot add/update array field
How do I add or update the rows, How exactly to pass properties? (see provided image)
- TablesDB not available in FRA?
Hi, in the cloud version, v1.8.0 Frankfurt, is it possible to use TablesDB ? I don’t see that feature in the console.
- Query.equal error
Hi guys. I'm using Appwrite Cloud, and I'm using version 21 of node-appwrite to benefit from transactions. The problem is I seem to be getting an error when I u...
