mirror of
https://github.com/nextcloud/server.git
synced 2026-04-21 14:23:17 -04:00
Make sure the group id parameter gets properly encoded when used in URLs
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
parent
b97a3061ca
commit
73cfc8dff9
3 changed files with 10 additions and 4 deletions
|
|
@ -312,6 +312,9 @@ export default {
|
|||
settings() {
|
||||
return this.$store.getters.getServerData
|
||||
},
|
||||
selectedGroupDecoded() {
|
||||
return decodeURIComponent(this.selectedGroup)
|
||||
},
|
||||
filteredUsers() {
|
||||
if (this.selectedGroup === 'disabled') {
|
||||
return this.users.filter(user => user.enabled === false)
|
||||
|
|
|
|||
|
|
@ -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/${encodeURIComponent(group)}/users/details?offset=${offset}&limit=${limit}&search=${search}`, 2))
|
||||
return api.get(OC.linkToOCS(`cloud/groups/${encodeURIComponent(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/${encodeURIComponent(groupid)}/details?offset=${offset}&limit=${limit}`, 2))
|
||||
return api.get(OC.linkToOCS(`cloud/users/${encodeURIComponent(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))
|
||||
},
|
||||
|
|
@ -320,7 +320,7 @@ const actions = {
|
|||
*/
|
||||
removeGroup(context, gid) {
|
||||
return api.requireAdmin().then((response) => {
|
||||
return api.delete(OC.linkToOCS(`cloud/groups/${encodeURIComponent(gid)}`, 2))
|
||||
return api.delete(OC.linkToOCS(`cloud/groups/${encodeURIComponent(encodeURIComponent(gid))}`, 2))
|
||||
.then((response) => context.commit('removeGroup', gid))
|
||||
.catch((error) => { throw error })
|
||||
}).catch((error) => context.commit('API_FAILURE', { gid, error }))
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@
|
|||
<UserList #content
|
||||
:users="users"
|
||||
:show-config="showConfig"
|
||||
:selected-group="selectedGroup"
|
||||
:selected-group="selectedGroupDecoded"
|
||||
:external-actions="externalActions" />
|
||||
</AppContent>
|
||||
</Content>
|
||||
|
|
@ -148,6 +148,9 @@ export default {
|
|||
}
|
||||
},
|
||||
computed: {
|
||||
selectedGroupDecoded() {
|
||||
return this.selectedGroup ? decodeURIComponent(this.selectedGroup) : null
|
||||
},
|
||||
users() {
|
||||
return this.$store.getters.getUsers
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue