Skip to content
Back

document team roles not working

  • 0
  • Web
  • Cloud
zrg0
9 Jun, 2025, 09:51

only owners is allowed as team roles.... any ideas on why? i have members of team with other roles

let promise = databases.createDocument( '<DATABASE_ID>', '<COLLECTION_ID>', {'actorName': 'Chris Evans', 'height': 183}, [ Permission.read(Role.any()), // Anyone can view this document Permission.update(Role.team("writers")), // Writers can update this document Permission.update(Role.team("admin")), // Admins can update this document Permission.delete(Role.user("5c1f88b42259e")), // User 5c1f88b42259e can delete this document Permission.delete(Role.team("admin")) // Admins can delete this document ] );

TL;DR
The issue is that only 'owners' are allowed as team roles in the permissions setup. The code snippet provided shows roles like 'writers' and 'admin', which are not recognized. A possible solution could be to adjust the code to reflect the correct team roles that are recognized in the system.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more