Update user IDs when logged in kudos are changed

Description

Add callbacks to:

  • Save user IDs when new logged in kudos are created.

  • Remove user IDs from kudos when users are deleted (similar to pseud IDs).

We don't need to do anything when users change/remove their default pseuds because the user IDs would stay the same in that case.

There is a separate issue to fill in user IDs for existing logged in kudos: AO3-5851.

How to test: user IDs on kudos are not yet displayed on the site in any way, so admins will need to check on a Rails console that user IDs are saved correctly on:

  • New logged in kudos.

  • New logged in kudos after a default pseud change (same user ID).

  • Logged in kudos after users are removed.

And that user IDs are not saved on guest kudos.

Assignee

redsummernight

Reporter

redsummernight

Roadmap

Misc

Priority

Medium

Affects versions

Fix versions

Components

BackEnd

Difficulty

Medium

Milestone

Internal 0.9
Configure