Prevent user from changing username with container registry tags
What does this MR do?
Adds validation to prevent a user from changing their username when they have a project with container registry tags, because
Namespace#move_dir doesn't work properly in this case.
The check for container registry tags is looking in the new path rather than the old during a user rename, because it happens
Namespace#after_update. The container registry stuff doesn't get moved to the new namespace.
Are there points in the code the reviewer needs to double check?
- I first attempted to fix
ContainerRepository#path, but at that point in the transaction, the old path is already lost. So it was simpler to implement the user validation instead
Grouppath changes already fail correctly with registry tags (see screenshot)
Screenshots (if relevant)
Username change with tags
Group already works
Does this MR meet the acceptance criteria?
- Changelog entry added, if necessary
API support added
- Added for this feature/bug
- All builds are passing
Has been reviewed by UX
Has been reviewed by Frontend
- Has been reviewed by Backend
Has been reviewed by Database
- Conform by the merge request performance guides
- Conform by the style guides
Branch has no merge conflicts with
master(if it does - rebase it please)
- Squashed related commits together
What are the relevant issue numbers?
Fixes #35451 (closed)