URL Encode "User management" API calls

XMLWordPrintable

    • Type: Suggestion
    • Resolution: Fixed
    • 6.6.1
    • Component/s: None
    • None

      Problem Definition

      Since User and Group management is handled by REST APIs since Bamboo 6.2, for external groups whose names include "special" characters for URLs, such as # and ?, the functionality fails to add the groups because the REST URL stops reading at those characters

      Suggested Solution

      Encode the Group (and User) calls to use the URL encoding for these characters.

      Character Encoding
      # %23
      ? %3F
      Space %20

      Why this is important

      Some companies have corporate group naming schemes that require these characters.

      Workaround

      Use cURL to send a REST API call
      Example: Adding a group called #testgroup with all Administration privileges:

      curl -XPUT \
      -H'Content-Type: application/json' \
      -u<user>:<pass> 'http://<bamboo-url>/rest/api/latest/permissions/global/groups/%23testgroup' \
      -d '["ADMINISTRATION","CREATE","CREATEREPOSITORY","READ"]'
      

            Assignee:
            Marcin Gardias
            Reporter:
            Ellie Z
            Votes:
            4 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: