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.
This commit is contained in:
gotjosh 2019-11-08 15:28:21 +01:00 committed by GitHub
parent 4d741ea387
commit 7e96a57c37
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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());
};
}