Skip to content
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

[2.x] Transfer team owner #526

Closed
wants to merge 8 commits into from
Closed

[2.x] Transfer team owner #526

wants to merge 8 commits into from

Conversation

joelbutcher
Copy link
Contributor

@joelbutcher joelbutcher commented Dec 10, 2020

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 the Remove button on each team member.

Screenshot 2020-12-10 at 12 22 46

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

@joelbutcher joelbutcher changed the title Team transfers [2.x] Transfer team owner Dec 10, 2020
@taylorotwell
Copy link
Member

Please implement this in your own applications.

@joelbutcher
Copy link
Contributor Author

@taylorotwell Can I just ask what the reason is for not putting this in Jetstream? Just in case someone raises this as an issue again?

@driesvints
Copy link
Member

@joelbutcher I guess it's to prevent from Jetstream becoming too bloated with features.

@joelbutcher
Copy link
Contributor Author

joelbutcher commented Dec 10, 2020

@driesvints Ah okay, understandable - It might be worth reviewing some of the open issues with the "enhancement" flag and determining whether any of those would cause Jetstream to become too bloated as well? Some of them, such as #465 or #483 Have been pending for a while.

I really do understand you guys have been busy with refining the docs and Laravel Sail, but I think a mention in either of those as to whether you're open to the idea/prefer not to include them (and why), would save a lot of contributors from spending time on one of them just to get it rejected.

@joelbutcher joelbutcher deleted the team-transfers branch December 10, 2020 16:09
@taylorotwell
Copy link
Member

@joelbutcher I'll try to go through them. People should definitely not take them existing as implicit approval that I would take on the maintenance burden of them in Jetstream. Thanks!

@joelbutcher
Copy link
Contributor Author

@taylorotwell no problem! I think a lot of people don't fully appreciate or understand the amount of work you and the team have on your hands maintaining this ecosystem you've built!

The fact you spent 3 weeks focussing on getting the docs up to a next-level standard, and still had time to review pull requests/issues, speaks amounts to your ability and dedication to the community - nothing but respect for you all! 👊🏼

@joelbutcher joelbutcher restored the team-transfers branch December 27, 2020 21:06
@joelbutcher
Copy link
Contributor Author

For anyone following this PR, I've just created a package for this, only for Livewire though - do I need more hobbies if this is what I'm doing on New Year's day? 😅

https://github.com/joelbutcher/jetstream-team-transfer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants