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

[server] Disallow removing all Owners from a team #13744

Merged
merged 1 commit into from
Oct 11, 2022

Conversation

easyCZ
Copy link
Member

@easyCZ easyCZ commented Oct 11, 2022

Description

Block changing role on teams of size 1 (or less).

Related Issue(s)

Fixes #11452

How to test

Release Notes

[teams] Prevent removing the owners of a team if the team size is 1 (or less)

Documentation

Werft options:

  • /werft with-local-preview
    If enabled this will build install/preview
  • /werft with-preview
  • /werft with-integration-tests=all
    Valid options are all, workspace, webapp, ide

@easyCZ easyCZ requested a review from a team October 11, 2022 08:17
@werft-gitpod-dev-com
Copy link

started the job as gitpod-build-mp-server-prevent-last-user-role-change.1 because the annotations in the pull request description changed
(with .werft/ from main)

@easyCZ easyCZ force-pushed the mp/server-prevent-last-user-role-change branch from d7e47ff to 942add7 Compare October 11, 2022 08:32
@roboquat roboquat added size/S and removed size/XS labels Oct 11, 2022
@easyCZ easyCZ force-pushed the mp/server-prevent-last-user-role-change branch from 942add7 to 9d221cc Compare October 11, 2022 08:43
@easyCZ easyCZ changed the title [server] Prevent changing role for teams of size 1 [server] Disallow removing all Owners from a team Oct 11, 2022
@easyCZ
Copy link
Member Author

easyCZ commented Oct 11, 2022

/werft run

👍 started the job as gitpod-build-mp-server-prevent-last-user-role-change.4
(with .werft/ from main)

@easyCZ
Copy link
Member Author

easyCZ commented Oct 11, 2022

/werft run

👍 started the job as gitpod-build-mp-server-prevent-last-user-role-change.5
(with .werft/ from main)

Copy link
Contributor

@jankeromnes jankeromnes left a comment

Choose a reason for hiding this comment

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

Tested and works! The error is never shown in the UI (so you think you've successfully set yourself to Member until the next time you visit the page), however I'd say this was a pre-existing issue and can be fixed in follow-up. (The error is successfully shown in the console though.)

@roboquat roboquat merged commit f7f90a0 into main Oct 11, 2022
@roboquat roboquat deleted the mp/server-prevent-last-user-role-change branch October 11, 2022 09:21
@roboquat roboquat added deployed: webapp Meta team change is running in production deployed Change is completely running in production labels Oct 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: webapp Meta team change is running in production deployed Change is completely running in production release-note size/S team: webapp Issue belongs to the WebApp team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Prevent the only remaining team owner to change their role to member
3 participants