Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-69472

Permission Scheme incorrectly shows that a different user has been granted a permission

XMLWordPrintable

      Summary

      If user2's current username is the same as user1's old username, granting a permission to user2 through Single user will incorrectly show that user1 has been granted the permission.

      This is a more problematic version of JRASERVER-65115

      Steps to Reproduce

      1. Create 2 users in Internal directory as follows:
        username Display Name
        user1 User 1
        user2 User 2
      2. Edit a Permission Scheme -> grant user2 a permission through Single user option
         Notice that User 2 is displayed
      3. Rename user1 to user123
      4. Rename user2 to user1

      Expected Behavior

      The Permission Scheme still displays User 2 as having the permission

      Actual Behavior

      The Permission Scheme now displays User 1 as having the permission

      Impacts

       There's no functionality impact because the permission is still granted correctly to user2 (User 2) who now has the username of user1. This can be verified by using Permission helper.

       In other words, this is only a visual bug, but it may cause a lot of confusion to JIRA and/or Project administrators.

      Notes

      This issue usually manifests when:

      1. Multiple user directories are used and 1 or more users exist in more than 1 directory
      2. Users have been renamed mostly for user migration purposes across user directories

      In JIRA db, table app_user looks somewhat like this:

      user_key lower_user_name
      user1 user123
      user2 user1

      and table cwd_user now looks somewhat like this:

      username Display Name
      user123 User 1
      user1 User 2

      Table schemepermissions shows that the permission is granted correctly to User 2:

      perm_type perm_parameter
      user user2

            Unassigned Unassigned
            vdung Andy Nguyen (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: