aboutsummaryrefslogtreecommitdiffstats
path: root/settings/src
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2018-06-29 08:37:04 +0200
committerMorris Jobke <hey@morrisjobke.de>2018-06-29 12:27:34 +0200
commitb495716daf9048d974504f7187048bfdfc22ea75 (patch)
treecce705835be6f7390ec2b62ead7c81c72bee6b8a /settings/src
parent322a113cc50540e816b9e49b8d295f7e930c98cb (diff)
downloadnextcloud-server-b495716daf9048d974504f7187048bfdfc22ea75.tar.gz
nextcloud-server-b495716daf9048d974504f7187048bfdfc22ea75.zip
Fix new group selection
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'settings/src')
-rw-r--r--settings/src/components/userList.vue8
-rw-r--r--settings/src/components/userList/userRow.vue8
-rw-r--r--settings/src/store/users.js4
3 files changed, 11 insertions, 9 deletions
diff --git a/settings/src/components/userList.vue b/settings/src/components/userList.vue
index 9b599fb275d..8dde013885a 100644
--- a/settings/src/components/userList.vue
+++ b/settings/src/components/userList.vue
@@ -221,11 +221,11 @@ export default {
},
canAddGroups() {
// disabled if no permission to add new users to group
- return this.groups.map((group) => {
+ return this.groups.map(group => {
// clone object because we don't want
// to edit the original groups
group = Object.assign({}, group);
- group.$isDisabled = group.canAdd !== true;
+ group.$isDisabled = group.canAdd === false;
return group;
});
},
@@ -235,7 +235,7 @@ export default {
},
quotaOptions() {
// convert the preset array into objects
- let quotaPreset = this.settings.quotaPreset.reduce((acc, cur) => acc.concat({id:cur, label:cur}), []);
+ let quotaPreset = this.settings.quotaPreset.reduce((acc, cur) => acc.concat({id: cur, label: cur}), []);
// add default presets
quotaPreset.unshift(this.unlimitedQuota);
quotaPreset.unshift(this.defaultQuota);
@@ -275,7 +275,7 @@ export default {
},
methods: {
onScroll(event) {
- this.scrolled = event.target.scrollTop>0;
+ this.scrolled = event.target.scrollTo > 0;
},
/**
diff --git a/settings/src/components/userList/userRow.vue b/settings/src/components/userList/userRow.vue
index 6f8972de63c..b0b638ee687 100644
--- a/settings/src/components/userList/userRow.vue
+++ b/settings/src/components/userList/userRow.vue
@@ -206,9 +206,9 @@ export default {
// 1. user NOT in group but no permission to add
// 2. user is in group but no permission to remove
groupClone.$isDisabled =
- (group.canAdd !== true &&
+ (group.canAdd === false &&
!this.user.groups.includes(group.id)) ||
- (group.canRemove !== true &&
+ (group.canRemove === false &&
this.user.groups.includes(group.id));
return groupClone;
});
@@ -405,7 +405,7 @@ export default {
* @returns {Promise}
*/
addUserGroup(group) {
- if (!group.canAdd) {
+ if (group.canAdd === false) {
return false;
}
this.loading.groups = true;
@@ -422,7 +422,7 @@ export default {
* @returns {Promise}
*/
removeUserGroup(group) {
- if (!group.canRemove) {
+ if (group.canRemove === false) {
return false;
}
this.loading.groups = true;
diff --git a/settings/src/store/users.js b/settings/src/store/users.js
index 1a8d6ac6ea4..a41f9bfcbb1 100644
--- a/settings/src/store/users.js
+++ b/settings/src/store/users.js
@@ -39,7 +39,9 @@ const defaults = {
id: '',
name: '',
usercount: 0,
- disabled: 0
+ disabled: 0,
+ canAdd: true,
+ canRemove: true
}
};