-
Suggestion
-
Resolution: Fixed
-
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"]'
[BAM-19956] URL Encode "User management" API calls
Workflow | Original: JAC Suggestion Workflow [ 3016533 ] | New: JAC Suggestion Workflow 3 [ 3602503 ] |
Status | Original: RESOLVED [ 5 ] | New: Closed [ 6 ] |
Workflow | Original: Confluence Workflow - Public Facing v4 [ 2703850 ] | New: JAC Suggestion Workflow [ 3016533 ] |
Issue Type | Original: Improvement [ 4 ] | New: Suggestion [ 10000 ] |
Fix Version/s | New: 6.6.1 [ 80799 ] | |
Resolution | New: Fixed [ 1 ] | |
Status | Original: Gathering Interest [ 11772 ] | New: Resolved [ 5 ] |
Assignee | New: Marcin Gardias [ mgardias ] |
Workflow | Original: Bamboo Workflow 2016 v1 [ 2696439 ] | New: Confluence Workflow - Public Facing v4 [ 2703850 ] |
Status | Original: Needs Triage [ 10030 ] | New: Gathering Interest [ 11772 ] |
Description |
Original:
h3. 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 h3. Suggested Solution Encode the Group (and User) calls to use the HTML encoding for these characters. h3. Why this is important Some companies have corporate group naming schemes that require these characters. h3. Workaround Use {{cURL}} to send a REST API call Example: Adding a group called {{#testgroup}} with all Administration privileges: {noformat} 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"]' {noformat} |
New:
h3. 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 h3. Suggested Solution Encode the Group (and User) calls to use the URL encoding for these characters. ||Character||Encoding|| |{{#}}|{{%23}}| |{{?}}|{{%3F}}| |Space|{{%20}}| h3. Why this is important Some companies have corporate group naming schemes that require these characters. h3. Workaround Use {{cURL}} to send a REST API call Example: Adding a group called {{#testgroup}} with all Administration privileges: {noformat} 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"]' {noformat} |
Issue Type | Original: New Feature [ 2 ] | New: Improvement [ 4 ] |