Skip to content

Add logging of memberships deleted when updating user organisation - #3106

Open
lfdebrux wants to merge 1 commit into
mainfrom
ldeb-log-deleted-group-memberships
Open

lfdebrux wants to merge 1 commit into
mainfrom
ldeb-log-deleted-group-memberships

Conversation

@lfdebrux

Copy link
Copy Markdown
Contributor

What problem does this pull request solve?

When a super admin changes the organisation a user belongs to, their group memberships are deleted. Currently there is no way to undo this or recover the memberships.

This commit adds logging as a (basic) way to make to it easier to work out what groups they belonged to in a situation where a user's organisation has been changed but we need to add them back to the groups. This came up recently when two organisations needed to be merged but some users were moved between the organisations to be merged beforehand.

Things to consider when reviewing

  • Ensure that you consider the wider context.
  • Does it work when run on your machine?
  • Is it clear what the code is doing?
  • Do the commit messages explain why the changes were made?
  • Are there all the unit tests needed?
  • Do the end to end tests need updating before these changes will pass?
  • Has all relevant documentation been updated?

When a super admin changes the organisation a user belongs to, their
group memberships are deleted. Currently there is no way to undo this or
recover the memberships.

This commit adds logging as a way to make to it easier to work out what
groups they belonged to in a situation where a user's organisation has
been changed but we need to add them back to the groups. This came up
recently when two organisations needed to be merged but some users were
moved between the organisations to be merged beforehand.
@lfdebrux
lfdebrux force-pushed the ldeb-log-deleted-group-memberships branch from 8a70dff to ab3b75e Compare September 17, 2026 06:22
@github-actions

Copy link
Copy Markdown

🎉 A review copy of this PR has been deployed! You can reach it at: https://pr-3106.admin.review.forms.service.gov.uk/

It may take 5 minutes or so for the application to be fully deployed and working. If it still isn't ready
after 5 minutes, there may be something wrong with the ECS task. You will need to go to the integration AWS account
to debug, or otherwise ask an infrastructure person.

For the sign in details and more information, see the review apps wiki page.

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.

1 participant