Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds team transfer functionality to both Inertia and Livewire stacks. Addresses #358
Background
Currently, deleting a users account also deletes all teams that user owns. This isn't ideal as if there are other members of that team, using the resources associated to that team, their ability to access those resources will be compromised.
Use case
As an employee working, I have previously created a team in my companies management app, inviting a number of colleagues to the team, so we can collaborate on multiple projects together.
I've accepted a job offer in a different company and have been asked to remove my user account from my current employers management app. However, there are projects associated with the teams that I own. I want to be able to transfer ownership of these teams, in order to close my account without disrupting the work of others.
Walkthrough
This PR adds a
Transfer Team
button left of theRemove
button on each team member.A confirmation modal is presented for the user to enter their password and confirm transfer. After which, the selected team member is detached from the team and associated as the new owner. The original owner is made an admin (open for debate).
Testing
Tests have been added for this PR under
TransferTeamTest