Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-68602

have ProjectNamingStrategy pass also the name of the parent

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • core
    • 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

            Unassigned Unassigned
            mawinter69 Markus Winter
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: