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

A job already exists with the name 'devjob1' - where as preexisting job name is "Devjob1"

    XMLWordPrintable

Details

    Description

      This is regarding "Manage and Assign Roles" name of the plugin is "plugin : Role based authorization strategy"

      If you take a look at the screen shot It has "employee" as a Global role which has only read access. After adding two roles

      "Developer" and "Tester" respectively with all the access and as per the job pattern matching have all access to the reapective jobs

      Starting with the "job name" Dev.* for developer (item roles) and Test.* for tester (item roles).

      Please look in the attachment.

      Attachments

        Activity

          If In understand correctly, the problem is that Jenkins does not let you define two jobs whose names differ only in upper vs. lower case, i.e. the uniqueness requirement treats the names as case-insensitive, but the item name pattern in the permissions is case-sensitive. And you want to solve that by making the job names case-sensitive for the uniqueness requirement as well.

          If you had two jobs named ”Devjob1” and ”devjob1”, wouldn’t that be confusing to your users? It might also cause problems on Windows or macOS when the Jenkins controller is on a case-insensitive file system. (I don’t know whether Jenkins is able to map a job to a directory whose name does not match the job name.)

          I think the better solution is to make the item name pattern in the permissions case insensitive. I believe you can already do that by adding (?i) to the beginning of the pattern, as described under “Special constructs” in java.util.regex.Pattern. If the plugin were changed to make the item name patterns case-insensitive by default, that might match user expectations better. If some users have set up access rules that rely on case sensitivity, they would have to add (?-i) to those before upgrading.

          kon Kalle Niemitalo added a comment - If In understand correctly, the problem is that Jenkins does not let you define two jobs whose names differ only in upper vs. lower case, i.e. the uniqueness requirement treats the names as case-insensitive, but the item name pattern in the permissions is case-sensitive. And you want to solve that by making the job names case-sensitive for the uniqueness requirement as well. If you had two jobs named ”Devjob1” and ”devjob1”, wouldn’t that be confusing to your users? It might also cause problems on Windows or macOS when the Jenkins controller is on a case-insensitive file system. (I don’t know whether Jenkins is able to map a job to a directory whose name does not match the job name.) I think the better solution is to make the item name pattern in the permissions case insensitive. I believe you can already do that by adding (?i) to the beginning of the pattern, as described under “Special constructs” in java.util.regex.Pattern . If the plugin were changed to make the item name patterns case-insensitive by default, that might match user expectations better. If some users have set up access rules that rely on case sensitivity, they would have to add (?-i) to those before upgrading.

          People

            oleg_nenashev Oleg Nenashev
            raj_sangvikar Raj
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: