summaryrefslogtreecommitdiffstats
path: root/settings/src/views/Users.vue
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2018-04-11 10:58:46 +0200
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2018-05-16 09:50:21 +0200
commite1297f1fde562d0c6ed67a86c5eefa0fb0a33946 (patch)
tree20615034e3ed4657839dec35dff8285d807f7b14 /settings/src/views/Users.vue
parent8bca1558c3d4056c1bfcb746516f9394fc93f09f (diff)
downloadnextcloud-server-e1297f1fde562d0c6ed67a86c5eefa0fb0a33946.tar.gz
nextcloud-server-e1297f1fde562d0c6ed67a86c5eefa0fb0a33946.zip
Various fixes and group deletion
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'settings/src/views/Users.vue')
-rw-r--r--settings/src/views/Users.vue25
1 files changed, 19 insertions, 6 deletions
diff --git a/settings/src/views/Users.vue b/settings/src/views/Users.vue
index 729cc943158..a20847b54d4 100644
--- a/settings/src/views/Users.vue
+++ b/settings/src/views/Users.vue
@@ -115,12 +115,11 @@ export default {
}
},
-
userCount() {
return this.$store.getters.getUserCount;
},
+
menu() {
- let self = this;
// Data provided php side
let groups = this.$store.getters.getGroups;
groups = Array.isArray(groups) ? groups : [];
@@ -133,6 +132,15 @@ export default {
item.href = '#group'+group.id.replace(' ', '_');
item.text = group.name;
item.utils = {counter: group.usercount};
+ if (item.id !== 'admin' && item.id !== '_disabled') {
+ // add delete button
+ let self = this;
+ item.utils.actions = [{
+ icon: 'icon-delete',
+ text: t('settings', 'Remove group'),
+ action: function(){}
+ }];
+ };
return item;
});
@@ -140,11 +148,12 @@ export default {
let adminGroup = groups.find(group => group.id == 'admin');
let disabledGroup = groups.find(group => group.id == '_disabled');
if (adminGroup.text) {
- adminGroup.text = t('settings', 'Admins');} // rename admin group
+ adminGroup.text = t('settings', 'Admins'); // rename admin group
+ }
if (disabledGroup.text) {
- disabledGroup.text = t('settings', 'Disabled users'); // rename disabled group
+ disabledGroup.text = t('settings', 'Disabled users'); // rename disabled group
if (disabledGroup.utils.counter === 0) {
- groups.splice(groups.findIndex(group => group.id == '_disabled'), 1); // remove disabled if empty
+ groups.splice(groups.findIndex(group => group.id == '_disabled'), 1); // remove disabled if empty
}
}
@@ -172,10 +181,14 @@ export default {
id:'new-user-button',
text: t('settings','New user'),
icon: 'icon-add',
- action: function(){self.showConfig.showNewUserForm=!self.showConfig.showNewUserForm}
+ action: () => this.showConfig.showNewUserForm=!this.showConfig.showNewUserForm
},
items: groups
}
+ },
+ removeGroup(groupid) {
+ console.trace(this);
+ return this.$store.dispatch('removeGroup', groupid);
}
}
}