appwrite / sdk-for-web

[READ-ONLY] Official Appwrite Web SDK ๐Ÿงก
https://appwrite.io
BSD 3-Clause "New" or "Revised" License
271 stars 58 forks source link

๐Ÿš€ Feature: List Teams in Account.get() #62

Closed silentmado closed 11 months ago

silentmado commented 11 months ago

๐Ÿ”– Feature description

I don't find a way to get the list of teams that the user belongs to, unless using Users.

I need to manage the logged user authorizations in my app, so I think it would be very useful if we can find out which Teams the user is a member of in the Account Object returned by Account.get().

๐ŸŽค Pitch

It will be very easy to manage authorizations in the application.

๐Ÿ‘€ Have you spent some time to check if this issue has been raised before?

๐Ÿข Have you read the Code of Conduct?

trashcoder commented 11 months ago

Doesn't const promise = teams.list();

work for this?

docs says: Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results. https://appwrite.io/docs/client/teams?sdk=web-default#teamsList

lohanidamodar commented 11 months ago

@trashcoder you are correct. While using client SDK, teams.list returns the teams current user is member of. @silentmado you should make a request, using teams service.