diff options
author | Gary Kim <gary@garykim.dev> | 2019-12-18 17:09:04 +0800 |
---|---|---|
committer | Gary Kim <gary@garykim.dev> | 2019-12-18 17:09:04 +0800 |
commit | f23c2d0665f76b47bd7dee1f3be124f4507135c3 (patch) | |
tree | 92dd6c5b291fd58befe1bdb3319e4a4afae19fc6 /apps/settings/src/store | |
parent | 9fd94b7e052e94b7170a67046c424e99ca6107f4 (diff) | |
download | nextcloud-server-f23c2d0665f76b47bd7dee1f3be124f4507135c3.tar.gz nextcloud-server-f23c2d0665f76b47bd7dee1f3be124f4507135c3.zip |
Fix listing users in groups with slash in the name
Signed-off-by: Gary Kim <gary@garykim.dev>
Diffstat (limited to 'apps/settings/src/store')
-rw-r--r-- | apps/settings/src/store/users.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/settings/src/store/users.js b/apps/settings/src/store/users.js index c888be9a52d..981ac663734 100644 --- a/apps/settings/src/store/users.js +++ b/apps/settings/src/store/users.js @@ -205,7 +205,7 @@ const actions = { search = typeof search === 'string' ? search : '' group = typeof group === 'string' ? group : '' if (group !== '') { - return api.get(OC.linkToOCS(`cloud/groups/${group}/users/details?offset=${offset}&limit=${limit}&search=${search}`, 2)) + return api.get(OC.linkToOCS(`cloud/groups/${encodeURIComponent(group)}/users/details?offset=${offset}&limit=${limit}&search=${search}`, 2)) .then((response) => { if (Object.keys(response.data.ocs.data.users).length > 0) { context.commit('appendUsers', response.data.ocs.data.users) @@ -275,7 +275,7 @@ const actions = { * @returns {Promise} */ getUsersFromGroup(context, { groupid, offset, limit }) { - return api.get(OC.linkToOCS(`cloud/users/${groupid}/details?offset=${offset}&limit=${limit}`, 2)) + return api.get(OC.linkToOCS(`cloud/users/${encodeURIComponent(groupid)}/details?offset=${offset}&limit=${limit}`, 2)) .then((response) => context.commit('getUsersFromList', response.data.ocs.data.users)) .catch((error) => context.commit('API_FAILURE', error)) }, |