Back

How to handle custom roles?

  • 0
  • Users
  • Accounts
Hosenur
26 Mar, 2023, 21:45

Let's say I am making an app where I need multiple user types like Admin and User

TL;DR
To handle custom roles in your app, you can follow these steps: 1. Add the user into teams using the Appwrite API. You can refer to the documentation for more details on how to do this. 2. Choose one of two approaches: a) Create separate teams for each role. This way, you can assign different teams to users based on their roles. b) Within a team, create different level roles. Use the Appwrite API to update membership roles for each user. For example, if you need Admin and User roles in your app, you can create separate teams for each role or create roles within a single
Binyamin
26 Mar, 2023, 21:48

First you can add the user into Teams https://appwrite.io/docs/client/teams

Then you can choose one of two ways

  1. Create more teams for each level.
  2. Within the team you can create different level roles https://appwrite.io/docs/client/teams?sdk=web-default#teamsUpdateMembershipRoles
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