phac-nml / irida-next

IRIDA Next
https://phac-nml.github.io/irida-next/
Apache License 2.0
8 stars 2 forks source link

Fix: Bot account membership destroy (DFCT0010061) #614

Closed deepsidhu85 closed 1 month ago

deepsidhu85 commented 1 month ago

What does this PR do and why?

Describe in detail what your merge request does and why.

This PR fixes a bug where bot account would be deleted from a namespace but if that bot was added as a member to another namespace previously, then membership within that namespace would not be deleted.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other pull requests.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Verify tests pass
  2. Login as a user
  3. Create a group Group 1
  4. Create a project under the user's namespace Project 1
  5. Create a bot account for Group 1
  6. Verify the bot account is added as a member on the Members page for the group
  7. Go to the members page for the project created in step 4
  8. Add the bot account created for Group 1 as a member to this project
  9. On the Members page for the project verify that the bot account is added as a member
  10. Go back into the group Group 1
  11. From the sidebar, click Settings and then click Bot Accounts
  12. Remove the bot account from the group
  13. Verify on the Members page for Group 1 and Project 1 that the bot account is no longer listed as a member

Note: To see the existing bug, repeat steps 2 through 13 on the main branch. You will see that the bot is still listed as a member for Project 1

PR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

github-actions[bot] commented 1 month ago

Simplecov Report

Covered Threshold
92.24% 90%