validateParams validates the wrong user

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Low
    • 8.4.2, 8.5.0
    • Affects Version/s: 7.0.0, 7.5.2, 7.6.14, 7.9.0, 7.13.6, 8.3.3, 8.4.0
    • Component/s: Java API
    • None
    • 7
    • 2
    • Severity 3 - Minor
    • 1

      Method AssigneeSystemField#validateParams is used to validate Assignee for multiple IssueService methods e.g.:

      • validateAssign
      • validateUpdate

      It's supposed to get ApplicationUser user from these methods for validation (checking Assign Issues permission in particular). However, currently it doesn't and checks the permission against the current logged-in user instead:

      hasPermission(ProjectPermissions.ASSIGN_ISSUES, issue, getAuthenticationContext().getLoggedInUser())
      

      This is a bug in which:

      • The current logged-in user may be anyone and the validation may pass in an unexpected way if this user has Assign Issues permission
      • In case this user doesn't have the permission, this error is thrown regardless:
        You do not have permission to assign issues.
        

         

            Assignee:
            Daniel Rauf
            Reporter:
            Andy Nguyen (Inactive)
            Votes:
            4 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: