Back

[SOLVED] How to make custom permission configuration for each collection

  • 0
  • Users
  • Accounts
Vedsaga
8 Mar, 2023, 02:39

so is it possible have some condition to config the default permission of each collection, for e.g. I want User with Verfied Phone Number + User Preferences role:distributior to only all access, then for User with Verfied Phone Number + User Preferences role:agent to only read access to all collection but, write access to certain collection, but if User Phone Number is not verified then don't let do anything...

TL;DR
You can use teams in Appwrite to group users and grant access based on certain conditions. For example, you can put verified users with the role "distributor" in one team and give them full access, while verified users with the role "agent" can be put in another team with read access and limited write access to certain collections. If a user's phone number is not verified, they won't have any permissions.
Drake
8 Mar, 2023, 02:41

Since Appwrite uses teams to group users and grant access I would suggest putting a user into a team if they are verified and they're a distributor. Then, use another team for verified and agent. Etc.

Vedsaga
8 Mar, 2023, 02:42

great thank you, it make sense I will try this and if works then will mark this ticket to Solved, thank you again @Steven for such active help

joeyouss
10 Mar, 2023, 13:45

[SOLVED] How to make custom permission configuration for each collection

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