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

Feat: Leave Project #1991

Merged
merged 9 commits into from
Jun 18, 2024
Merged

Feat: Leave Project #1991

merged 9 commits into from
Jun 18, 2024

Conversation

DanielHougaard
Copy link
Collaborator

Description 📣

This PR introduces support for leaving projects. Previously it wasn't possible to leave projects after you had been invited to it. It's only possible to leave a project if you've been added as a member. If you're a part of a project via. groups, you shouldn't be able to leave it manually.

To be able to leave a project you have to meet a set of conditions.

  1. The project needs to be a V2 project.
  2. There has to be at least 2 users in the project prior to leaving the project
  3. After leaving the project, there has to be at least 1 admin left in the project

Type ✨

  • Bug fix
  • New feature
  • Breaking change
  • Documentation

@DanielHougaard DanielHougaard self-assigned this Jun 17, 2024
@DanielHougaard DanielHougaard marked this pull request as ready for review June 17, 2024 20:35
@DanielHougaard DanielHougaard changed the title Feat: Leave project feat: Leave Project Jun 17, 2024
@DanielHougaard DanielHougaard changed the title feat: Leave Project Feat: Leave Project Jun 17, 2024
});
return;
}
// If the user has access to read members, and there's less than 1 admin member excluding the current user, they can't leave the project.
Copy link
Collaborator

Choose a reason for hiding this comment

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

suggestions: comments are super helpful but i think you want to strike the right balance of providing enough info about unclear code sections vs keeping things concise!

Copy link
Collaborator

@maidul98 maidul98 left a comment

Choose a reason for hiding this comment

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

Great work! I think as we add more items to the danger section we might want to make it look more like Github's
CleanShot 2024-06-17 at 20 30 20@2x

@maidul98 maidul98 merged commit e3beeb6 into main Jun 18, 2024
6 checks passed
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

2 participants