-
Improvement
-
Resolution: Fixed
-
Minor
-
None
-
-
2.367
The checkName method of ProjectNamingStrategy currently only gets the plain potential jobname passed. What is missing is name of the parent (e.g. when the job is created inside a folder). While in a UI context one can obtain the parent from the stapler context, this doesn't work when one tries to create jobs via the CLI.
So it would be beneficial if the the name of the parent is passed as additional parameter to the ProjectNamingStrategy and it is up to the naming strategy if it uses just the job name or the full name.
Use case:
the Rolestrategy plugin implements also a ProjectNamingStrategy to restrict which users can create which jobs. This is currently broken (https://issues.jenkins.io/browse/JENKINS-19934)
In order to be able to properly check the rules the naming strategy needs to know the full name of an item
- links to