Uploaded image for project: 'Bitbucket Cloud'
  1. Bitbucket Cloud
  2. BCLOUD-17396

BBQL on permissions API should accept user UUIDs with curlies

    XMLWordPrintable

Details

    Description

      Reported by a vendor:

      I need to check if a given user (knowing its uuid) is an admin of the account where our application was installed. To do that, I'm calling:

      /2.0/teams/<team uuid>/permissions?q=user.uuid="<user uuid>" AND permission = "admin"

      It was not working until I realized that the uuid passed in the BBQL query should not have its curly braces (while this is required in the URL path segments).

      This works:
      /2.0/teams/

      {32c9b1aa-ff23-4a90-b5c7-bd5a3036a3e8}/permissions?q=user.uuid%3D%22ac49ff0d-4d0d-4bde-b78e-993ecf35db42%22%20AND%20permission%3D%22admin%
      22

      This doesn't:
      /2.0/teams/{32c9b1aa-ff23-4a90-b5c7-bd5a3036a3e8}

      /permissions?q=user.uuid%3D%22%7Bac49ff0d-4d0d-4bde-b78e-993ecf35db42%7D%22%20and%20permission%3D%22
      admin%22

      Is it the expected behavior? Can I rely on this to continue working the same in the future? > Or is it a bug that may eventually be fixed and then will break our integration?

      Attachments

        Activity

          People

            Unassigned Unassigned
            idick Ian Dick
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: