-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(teams): endpoint to update membership roles #1142
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should make sure a team doesn't become ownerless.
Meaning, it shouldn't be possible to be the last owner
and remove the owner role from yourself.
I think I would leave this to be handled on client and not force a specific flow. Even when we create teams from the console they start without any members. Using the servers SDKs you can manipulate the team membership or even use cloud functions to delete orphaned teams. |
Fair point 👍🏻 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just a minor change.
Co-authored-by: Eldad A. Fux <eldad.fux@gmail.com>
…date-membership-endpoint
What does this PR do?
Adds a new endpoint PATCH '/v1/teams/:teamId/memberships/:membershipId' to allow users to modify roles previously granted to team members.
Also created a new event to trigger in this case
teams.memberships.update
Test Plan
Added new tests
Related PRs and Issues
NA
Have you read the Contributing Guidelines on issues?
Yes