I want to create a document that has also the read permission for a other user. When I try to achive this with:
Permission.read(Role.user(entry.userid)), Permission.read(Role.user(entry.enemyid)),
I get the error "Permission must be one of: (any, users, user:OWN USER ID").
When I add the permission from the web panel everything works fine. Document Security is enabled and the collection permissions are set to users create enabled.