summaryrefslogtreecommitdiffstats
path: root/settings/src/components/userList/userRow.vue
diff options
context:
space:
mode:
Diffstat (limited to 'settings/src/components/userList/userRow.vue')
-rw-r--r--settings/src/components/userList/userRow.vue8
1 files changed, 3 insertions, 5 deletions
diff --git a/settings/src/components/userList/userRow.vue b/settings/src/components/userList/userRow.vue
index 67a2582fc11..9b1a164ce49 100644
--- a/settings/src/components/userList/userRow.vue
+++ b/settings/src/components/userList/userRow.vue
@@ -175,12 +175,12 @@ export default {
},
// Mapping saved values to objects
userQuota() {
- if (this.user.quota.quota > 0) {
+ if (this.user.quota.quota >= 0) {
// if value is valid, let's map the quotaOptions or return custom quota
let humanQuota = OC.Util.humanFileSize(this.user.quota.quota);
let userQuota = this.quotaOptions.find(quota => quota.id === humanQuota);
return userQuota ? userQuota : {id:humanQuota, label:humanQuota};
- } else if (this.user.quota.quota === 0 || this.user.quota.quota === 'default') {
+ } else if (this.user.quota.quota === 'default') {
// default quota is replaced by the proper value on load
return this.quotaOptions[0];
}
@@ -437,9 +437,7 @@ export default {
validateQuota(quota) {
// only used for new presets sent through @Tag
let validQuota = OC.Util.computerFileSize(quota);
- if (validQuota === 0) {
- return this.setUserQuota('none');
- } else if (validQuota !== null) {
+ if (validQuota !== null && validQuota >= 0) {
// unify format output
return this.setUserQuota(OC.Util.humanFileSize(OC.Util.computerFileSize(quota)));
}