Hi
Is it possible to disable a users and teams thru the ui and api?
Thanks
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
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
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?
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.
Okay, got it.
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.
Is this make sense?
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
You don't need to remove users from any teams.
Just assign or unassign user roles.
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
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.
Recommended threads
- Upgrade Issue
Am having issue upgrading my appwrite account to pro as my card number is 19 and the required input is 16 digit
- Trying to Figure out how to delete a use...
If i have a button in an app that allows a user to delete their account, can I not just call a function from my swift app to Appwrite to have the account delete...
- Expected a value of type 'bool', but got...
I am trying to get current User, but get this error message when I do. I get back user prefs, but error comes from trying account.get() So I am getting User. I ...