Skip to content

Commit

Permalink
Fix: URL Encode Groupd IDs for external team sync (#20280)
Browse files Browse the repository at this point in the history
* Fix: URL Encode Group IDs for external team sync

External Group IDs can have special characters. Encode them to make them
URL-safe.
  • Loading branch information
gotjosh authored Nov 8, 2019
1 parent 4d741ea commit 7e96a57
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion public/app/features/teams/state/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ export function addTeamGroup(groupId: string): ThunkResult<void> {
export function removeTeamGroup(groupId: string): ThunkResult<void> {
return async (dispatch, getStore) => {
const team = getStore().team.team;
await getBackendSrv().delete(`/api/teams/${team.id}/groups/${groupId}`);
await getBackendSrv().delete(`/api/teams/${team.id}/groups/${encodeURIComponent(groupId)}`);
dispatch(loadTeamGroups());
};
}
Expand Down

0 comments on commit 7e96a57

Please sign in to comment.