Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-13134

API lists incorrect permission for repository hooks endpoint

    XMLWordPrintable

Details

    Description

      Issue Summary

      Identified in 5.16.3 and 7.18.2, the repository hooks API endpoint lists the permission for the GET method as REPO_READ. However, this conflicts with the repository permissions documentation, which states that the repository settings pages require Admin permission.

      Resources:

      Steps to Reproduce

      1. Create user with read only permission to a repository
      2. Make a curl call to the hooks endpoint
        curl -u user -k --request GET https://my.internal.bitbucket/rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/settings/hooks
        

      Expected Results

      (as per API documentation)

      User should receive the hook settings for the repository.

      Actual Results

      The below exception is thrown:

      {"errors":[{"context":null,"message":"You are not permitted to access this resource","exceptionName":"com.atlassian.bitbucket.AuthorisationException"}]}
      

      Workaround

      The user requesting this endpoint must have Admin permissions to the repository as noted in our repository permissions documentation.

      Attachments

        Issue Links

          Activity

            People

              khughes@atlassian.com Kristy
              mwilliams@atlassian.com Mark A.
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: