Resolve "Add messages to warn and stop users when attempting to change the path of projects with NPM packages"
What does this MR do?
Display a message and stop the users when the path of projects with NPM packages is updated. More precisely, it's when users try to update the root namespace of projects with NPM packages that the action is blocked and a message is displayed.
According to the docs, an NPM package must be published under a scope and this scope must have the same name as the root namespace. If this root namespace changes then npm publish
will no longer work.
Given a project Project
with NPM packages, here are the 3 actions where this check is executed:
- Update path of a group which is also a root namespace for
Project
. - Transfer a subgroup containing
Project
out of its root namespace. - Transfer
Project
out of its root namespace.
The check looks for projects within the given group or subgroup.
If the check fails, the action is aborted and a message is displayed
see #12417 (closed)
Screenshots
Here are the 3 different actions:
Transfer a subgroup out of its root namespace:
Transfer a project out of its root namespace:
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation created/updated or follow-up review issue created -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Performance and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team