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

Prevent deleting teams that are still referenced #5108

Merged
merged 4 commits into from
Feb 1, 2021
Merged

Conversation

fm3
Copy link
Member

@fm3 fm3 commented Jan 29, 2021

Fixed a bug where the user could delete teams that were still referenced in annotations, projects or task types, thus creating invalid state.

Also note follow-up issue #5109

URL of deployed dev instance (used for testing):

Steps to test:

  • Try deleting organization team, should be forbidden
  • Try deleting team while not admin, should be forbidden
  • Try deleting fresh team, should work
  • Create team, create task type or project that uses that team, deleting it should now be forbidden.

Issues:


@fm3 fm3 self-assigned this Jan 29, 2021
@fm3 fm3 marked this pull request as ready for review January 29, 2021 10:53
@fm3 fm3 requested a review from youri-k January 29, 2021 10:53
Copy link
Contributor

@youri-k youri-k left a comment

Choose a reason for hiding this comment

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

General change looks very good, but please see my small comments 🙂

app/models/project/Project.scala Outdated Show resolved Hide resolved
app/models/project/Project.scala Show resolved Hide resolved
conf/messages Outdated Show resolved Hide resolved
Copy link
Contributor

@youri-k youri-k left a comment

Choose a reason for hiding this comment

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

LGTM :shipit:

@fm3 fm3 merged commit 6ec6fd1 into master Feb 1, 2021
@fm3 fm3 deleted the teams-delete-assertion branch February 1, 2021 08:02
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.

Deleting team breaks the tasks still linked to it
2 participants