Skip to content
Back

Disable users and teams

  • 0
  • Users
  • Teams
oferardi
5 Jun, 2023, 16:12

Hi

Is it possible to disable a users and teams thru the ui and api?

Thanks

TL;DR
The user wants to disable users and teams in their app. They suggest using roles to mimic the "disable" action on users. The user also mentions assigning or unassigning user roles instead of removing users from teams. Another suggestion is to approach data access based on Team+Role all together. The user wants team owners to be able to disable or enable users, and admin users to be able to disable teams. The user also mentions integrating a payment system in the future. There is no solution provided in the thread.
Binyamin
5 Jun, 2023, 16:14

In the UI you can go to your project settings and disable whatever service you don't want to be accessible from any of Client sides SDKs

oferardi
5 Jun, 2023, 16:46

Hi

I'm looking for a feature to disable specific users access by the team owner. And to disable teams by admin.

Is it any plan to support it?

Meanwhile I understand that I'll have to manage it with collections

Binyamin
5 Jun, 2023, 16:48

Ohh, that's a different use-case. You want to be able to block users by team? Meaning any user in team b will be disabled?

And, to disable team, you mean just the users or the team it self?

Can you elaborate about your use-case, what you're trying to achieve?

oferardi
5 Jun, 2023, 17:19

Each team is customer that the team owners can manage its users. The team owners shall be able to disable or enable users by themselves.

On the first stage the admin users shall be able to create teams and team owners (customers). But it shall also be able to disable a team's so its users won't be able to access data or features on the app - that are related to their team.

The next phase will be to integrate a payment system so only when a customer is paying to the service he will be able to access the app or the data in the app.

Binyamin
5 Jun, 2023, 17:23

Okay, got it.

Binyamin
5 Jun, 2023, 17:27

What I think is that as you are planning this type of app you should approach data-access based on Team+Role all together.

For example: Customer A is the owner of the A Team. Inside the team there will be all of the users. Each user will share the A team, and the following roles.

  • User
  • Active user

So in order for user to be able to see data related to the A team the user must have both roles user & active. Disabling user is just removing the active role from the user.

As for the admins - in our example, the owner of the A team - you should use functions to set and change the teams.

In general you don't need an extra collection as Appwrite module inculde all you need to accomplish that goal.

Binyamin
5 Jun, 2023, 17:27

Is this make sense?

oferardi
5 Jun, 2023, 18:07

Hi Sounds perfect to use a role for a "Active users"..

As for admin what do you mean to change teams? I need only temporary action to disable the team and enable it. Not to remove its users from the team

Binyamin
5 Jun, 2023, 18:27

You don't need to remove users from any teams.

Binyamin
5 Jun, 2023, 18:27

Just assign or unassign user roles.

oferardi
5 Jun, 2023, 18:55

I'll have to manage it somehow. Let's say that there is a team with two active users (by role) and two disabled. If I'll disable the team and activate it again it shall remain the same active users before the change.

User can be assigned to multipile teams. So maybe it's requires to add additional role with the active teams list..or similar solution

Binyamin
5 Jun, 2023, 19:04

Oh, you can't disable team on is own.

That's why I've suggested to use roles, so you can mimic the "disable" action on users.

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