Project 'gitlab-org/gitlab-ce' was moved to 'gitlab-org/gitlab-foss'. Please update any links and bookmarks that may still have the old path.
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 User#after_update
=> 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 -
Group
path 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 -
Documentation created/updated -
API support added - Tests
-
Added for this feature/bug -
All builds are passing
-
- Review
-
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)
Edited by Michael Kozono
Merge request reports
Activity
Please register or sign in to reply