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

Laushinka/allow users to delete 5066 #5966

Merged
merged 1 commit into from
Oct 4, 2021

Conversation

laushinka
Copy link
Contributor

@laushinka laushinka commented Sep 30, 2021

Description

  1. A new settings page for teams.
  2. Allows team deletion on the settings page.
  3. When a team is deleted, projects are also deleted.

Related Issue(s)

Fixes #5066

How to test

Release Notes

Teams get a dedicated settings page where for now deletion can be done. 

Screenshot 2021-09-30 at 19 08 24

Screenshot 2021-09-30 at 19 09 33

@JanKoehnlein
Copy link
Contributor

JanKoehnlein commented Oct 1, 2021

/werft run

👍 started the job as gitpod-build-laushinka-allow-users-to-delete-5066.29

@laushinka
Copy link
Contributor Author

@gtsiolis @JanKoehnlein I just realized that members should be removed as well. I will push another commit and meanwhile hold the PR.

@laushinka
Copy link
Contributor Author

/hold

@gtsiolis
Copy link
Contributor

gtsiolis commented Oct 1, 2021

@laushinka let us know when this is ready for review!

@laushinka
Copy link
Contributor Author

/unhold

@laushinka
Copy link
Contributor Author

laushinka commented Oct 1, 2021

@laushinka let us know when this is ready for review!

@gtsiolis @JanKoehnlein Ready now. Just finished testing the member removal. Also just fyi I'm unable to log into Slack.

@gtsiolis
Copy link
Contributor

gtsiolis commented Oct 1, 2021

Looking at this now! 👀

Copy link
Contributor

@gtsiolis gtsiolis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great to see this happening, @laushinka! 🧁

So much looking forward for being able to delete teams in staging and production. 🙌

Left some comments below! Let me know what you think.

components/dashboard/src/teams/TeamSettings.tsx Outdated Show resolved Hide resolved
},
{
title: 'Settings',
link: `/t/${team.slug}/settings`,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue(blocking): Although permissions are still not clear for team owners and members, it makes sense to allow only team owners to delete a team, right? Cross-posting WIP documentation from https://github.com/gitpod-io/website/pull/842 for visibility. 👀

suggestion: Since settings currently include only one action to delete a team, what do you think of hiding the settings tab for non-owners? Cc @svenefftinge because #5066 (comment) and relevant discussion (internal).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gtsiolis You're right, this makes sense!

<PageWithSubMenu subMenu={settingsMenu} title='General' subtitle='Manage general team settings.'>
<h3>Delete Team</h3>
<p className="text-base text-gray-500 pb-4">Deleting this team will also remove all associated data with this team, including projects and workspaces. Deleted teams cannot be restored!</p>
<button className="danger secondary" onClick={() => setModal(true)}>Delete Account</button>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue: This returns an error in console and so feedback to the user when they are have member permissions, not owner permission, which also lacks visual feedback for the user. Hiding the project settings page for members (non-owners) could resolve this issue. WDYT? ❓

<PageWithSubMenu subMenu={settingsMenu} title='General' subtitle='Manage general team settings.'>
<h3>Delete Team</h3>
<p className="text-base text-gray-500 pb-4">Deleting this team will also remove all associated data with this team, including projects and workspaces. Deleted teams cannot be restored!</p>
<button className="danger secondary" onClick={() => setModal(true)}>Delete Account</button>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue: This removes the team entry in the team scope selector but 🅰️ does not actually remove the rest of the team members and 🅱️ the rest of the team previously added as members or owners can still access team page, add projects, open workspaces, and trigger prebuilds. Shall we redirect back to the personal account when a user tries to access resources for a deleted team?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is still an issue. Minor and non-blocking. Added follow up #6016.

<PageWithSubMenu subMenu={settingsMenu} title='General' subtitle='Manage general team settings.'>
<h3>Delete Team</h3>
<p className="text-base text-gray-500 pb-4">Deleting this team will also remove all associated data with this team, including projects and workspaces. Deleted teams cannot be restored!</p>
<button className="danger secondary" onClick={() => setModal(true)}>Delete Account</button>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: When deleting a team a user is redirected back to /account. What do you think of redirecting back to the starting page of the user, /workspaces?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I was torn re where to redirect and was looking forward to your input. It can be a bit disorienting to delete a team and then suddenly seeing another settings page, so I agree with redirecting back to /workspaces.

@laushinka
Copy link
Contributor Author

@gtsiolis It's ready for another review!

@laushinka
Copy link
Contributor Author

laushinka commented Oct 3, 2021

/werft run

👍 started the job as gitpod-build-laushinka-allow-users-to-delete-5066.36

@laushinka laushinka force-pushed the laushinka/allow-users-to-delete-5066 branch from 9e0c55b to c12fa27 Compare October 3, 2021 21:53
@laushinka laushinka force-pushed the laushinka/allow-users-to-delete-5066 branch from db2a679 to 5737672 Compare October 3, 2021 23:14
@gtsiolis gtsiolis self-requested a review October 4, 2021 08:11
@JanKoehnlein
Copy link
Contributor

JanKoehnlein commented Oct 4, 2021

/werft run

👍 started the job as gitpod-build-laushinka-allow-users-to-delete-5066.42

@laushinka
Copy link
Contributor Author

laushinka commented Oct 4, 2021

/werft run

👍 started the job as gitpod-build-laushinka-allow-users-to-delete-5066.43

@JanKoehnlein
Copy link
Contributor

/lgtm

@roboquat
Copy link
Contributor

roboquat commented Oct 4, 2021

LGTM label has been added.

Git tree hash: 0da431ffac03389cf65df56ab5b1f9883826580b

@roboquat
Copy link
Contributor

roboquat commented Oct 4, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JanKoehnlein

Associated issue: #5066

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@roboquat roboquat merged commit 6ff8888 into main Oct 4, 2021
@roboquat roboquat deleted the laushinka/allow-users-to-delete-5066 branch October 4, 2021 14:20
@gtsiolis
Copy link
Contributor

gtsiolis commented Oct 4, 2021

Thanks @laushinka @JanKoehnlein! 🏀

Just took another look at this and noticed the issue in #5966 (comment) is still present.

Added a follow-up issue in #6016 since this has been merged as this seems to be minor and an edge case, see #5966 (comment).

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

Successfully merging this pull request may close these issues.

Allow users to delete teams
4 participants