summaryrefslogtreecommitdiffstats
path: root/settings
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2018-06-05 17:37:58 +0200
committerJulius Härtl <jus@bitgrid.net>2018-06-06 11:40:09 +0200
commit523cd0af8879482e0f06a647652f00384057701b (patch)
tree43e53dae132e4d7dd860fcae56053dcada228192 /settings
parent9d6aa333d404b4080194bc794dc3ef1a21e2c4c2 (diff)
downloadnextcloud-server-523cd0af8879482e0f06a647652f00384057701b.tar.gz
nextcloud-server-523cd0af8879482e0f06a647652f00384057701b.zip
Add search/offset/limit parameters to group fetching
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'settings')
-rw-r--r--settings/src/components/appDetails.vue2
-rw-r--r--settings/src/store/users.js6
-rw-r--r--settings/src/views/Apps.vue2
3 files changed, 5 insertions, 5 deletions
diff --git a/settings/src/components/appDetails.vue b/settings/src/components/appDetails.vue
index 9469c82ae67..a3510ee9182 100644
--- a/settings/src/components/appDetails.vue
+++ b/settings/src/components/appDetails.vue
@@ -57,7 +57,7 @@
<input type="checkbox" :value="app.id" v-model="groupCheckedAppsData" v-on:change="setGroupLimit" class="groups-enable__checkbox checkbox" :id="prefix('groups_enable', app.id)">
<label :for="prefix('groups_enable', app.id)">Auf Gruppen beschränken</label>
<input type="hidden" class="group_select" title="Alle" value="">
- <multiselect v-if="isLimitedToGroups(app)" :options="groups" :value="appGroups" @select="addGroupLimitation" @remove="removeGroupLimitation"
+ <multiselect v-if="isLimitedToGroups(app)" :options="groups" :value="appGroups" @select="addGroupLimitation" @remove="removeGroupLimitation" :options-limit="5"
:placeholder="t('settings', 'Limit app usage to groups')"
label="name" track-by="id" class="multiselect-vue"
:multiple="true" :close-on-select="false">
diff --git a/settings/src/store/users.js b/settings/src/store/users.js
index d3acb2ce553..f2393a93742 100644
--- a/settings/src/store/users.js
+++ b/settings/src/store/users.js
@@ -197,9 +197,9 @@ const actions = {
.catch((error) => context.commit('API_FAILURE', error));
},
- getGroups(context) { /* { offset, limit, search } */
- //search = typeof search === 'string' ? search : '';
- return api.get(OC.linkToOCS(`cloud/groups`, 2)) /* ?offset=${offset}&limit=${limit}&search=${search}` */
+ getGroups(context, { offset, limit, search }) {
+ search = typeof search === 'string' ? search : '';
+ return api.get(OC.linkToOCS(`cloud/groups?offset=${offset}&limit=${limit}&search=${search}`, 2))
.then((response) => {
if (Object.keys(response.data.ocs.data.groups).length > 0) {
response.data.ocs.data.groups.forEach(function(group) {
diff --git a/settings/src/views/Apps.vue b/settings/src/views/Apps.vue
index a4955f10c51..79ab86f24d0 100644
--- a/settings/src/views/Apps.vue
+++ b/settings/src/views/Apps.vue
@@ -70,7 +70,7 @@ export default {
beforeMount() {
this.$store.dispatch('getCategories');
this.$store.dispatch('getAllApps');
- this.$store.dispatch('getGroups');
+ this.$store.dispatch('getGroups', {offset: 0, limit: -1});
this.$store.commit('setUpdateCount', this.$store.getters.getServerData.updateCount)
},
mounted() {