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
- Unable to add user preferences within au...
When i click on the add preference button nothing happens. There are other buttons within the page which seem unresponsive, including the multi-authentication t...
- cli broke with new varchar type??
``` appwrite types ./appwritetypes ℹ Info: Detected language: ts ℹ Info: Directory: ./...
- Substring lookup for array elements
Hello, Is substring look up possible for array of strings? ```js Query.contains('product_names', [chair]), ``` this only works if I have the exact item name. `...