I'm trying to get an understanding of the permissions system and can't seem to wrap my head around it.
Based on the documentation its states that "permissions set at the collection level will override all document level permissions", this makes sense. However, what if I don't set any permissions at the collection level and only want to set permissions per document? When I try to add an item to a collection I get a permission denied even after I try to set the permissions in the post request like so:
const payload = {user_id:user.$id, body:postBody}
const permissions = [
Permission.read(Role.user(user.$id)), Permission.write(Role.user(user.$id)),
]
const response = await databases.createDocument(DATABASE_ID, POSTS_COLLECTION_ID, ID.unique(), payload, permissions);
Do I have the right idea here? What am I Missing?