Uploaded image for project: 'Bitbucket Server'
  1. Bitbucket Server
  2. BSERV-11786

Capital case username does not work with updating PR participant status API

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: 6.2.0, 6.3.1
    • Fix Version/s: 6.6.0
    • Component/s: None
    • Labels:

      Description

      Issue Summary

      userSlug with capital case in the REST API URL /rest/api/1.0/projects/<projectKey>/repos/<repositorySlug>/pull-requests/<pullRequestId>/participants/<userSlug> does not work

      Steps to Reproduce

      1. Create a username testName
      2. Create a project TST
      3. Create a repository reponame
      4. Create pull request with ID 1
      5. Create a file test.json with the following content:
        {
        "status": "NEEDS_WORK"
        }
        
      6. Run the following cURL:
        curl -u testName -X PUT -H "Content-Type: application/json" -d @test.json http://localhost:7990/rest/api/1.0/projects/TST/repos/reponame/pull-requests/1/participants/testName 
        
        

      Expected Results

      The status update is successful

      Actual Results

      It fail with the following reply

      <?xml version="1.0" encoding="UTF-8" standalone="yes"?><status><status-code>403</status-code><message>You may only update your own status.</message></status>
      

      Workaround

      Changing userSlug from capital case to lower case will work fine

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              khughes@atlassian.com Kristy
              Reporter:
              klfoong Foong
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: