Fix: URL Encode Groupd IDs for external team sync (#20280)

* Fix: URL Encode Group IDs for external team sync

External Group IDs can have special characters. Encode them to make them
URL-safe.

(cherry picked from commit 7e96a57c37)
This commit is contained in:
gotjosh
2019-11-14 08:33:19 -05:00
committed by Kyle Brandt
parent 3abca7a820
commit 1033687df6
+1 -1
View File
@@ -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());
};
}