Back

[ SOLVED ] How createPermissions for new user?

  • 0
  • Self Hosted
  • Functions
  • Teams
jekalat
24 May, 2023, 16:21

Hi! In my project, I need only some users to be able to create teams How can I set permissions for user? Thank you

TL;DR
To restrict certain users from creating teams, you can disable the teams service. This will prevent end users from creating teams. Then, you can create a function to specifically allow certain users to create teams, and only grant access to those select users to execute the function. Additionally, you can set permissions for users by using the create permission function and specifying the desired permissions (e.g., [teams.read]) for the users.
Drake
24 May, 2023, 16:22

How can I set permissions for user?

You mean how do you restrict it so that only some users can create teams?

jekalat
24 May, 2023, 16:23

Yes

jekalat
24 May, 2023, 16:25

I think I can restrict by permissions, like create permission [teams.read] for users

Drake
24 May, 2023, 16:26

I would disable the teams service. This prevents end users from creating teams. Then, I would expose a function to create the team. Only select users would have access to execute the function

jekalat
24 May, 2023, 16:31

@Steven Thank you!

jekalat
24 May, 2023, 16:34

[ SOLVED ] How createPermissions for new user?

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