diff --git a/apps/provisioning_api/lib/Controller/AUserData.php b/apps/provisioning_api/lib/Controller/AUserData.php
index 25e5ab5c86d1a..a87ca79fc7b1c 100644
--- a/apps/provisioning_api/lib/Controller/AUserData.php
+++ b/apps/provisioning_api/lib/Controller/AUserData.php
@@ -176,7 +176,7 @@ protected function fillStorageInfo(string $userId): array {
throw new OCSException('User does not exist', 101);
}
$quota = $user->getQuota();
- if ($quota !== 'none') {
+ if ($quota !== 'none' && $quota !== 'default') {
$quota = OC_Helper::computerFileSize($quota);
}
$data = [
diff --git a/lib/private/User/User.php b/lib/private/User/User.php
index e171a65f8ce7f..8f6c14ab6c401 100644
--- a/lib/private/User/User.php
+++ b/lib/private/User/User.php
@@ -375,11 +375,7 @@ public function getEMailAddress() {
* @since 9.0.0
*/
public function getQuota() {
- $quota = $this->config->getUserValue($this->uid, 'files', 'quota', 'default');
- if($quota === 'default') {
- $quota = $this->config->getAppValue('files', 'default_quota', 'none');
- }
- return $quota;
+ return $this->config->getUserValue($this->uid, 'files', 'quota', 'default');
}
/**
diff --git a/settings/src/components/userList.vue b/settings/src/components/userList.vue
index 521ad7cc39270..743db7ff58985 100644
--- a/settings/src/components/userList.vue
+++ b/settings/src/components/userList.vue
@@ -143,7 +143,7 @@ import Vue from 'vue';
export default {
name: 'userList',
- props: ['users', 'showConfig', 'selectedGroup', 'externalActions'],
+ props: ['users', 'showConfig', 'selectedGroup', 'externalActions', 'defaultQuotaValue'],
components: {
userRow,
Multiselect,
@@ -195,6 +195,10 @@ export default {
* Register search
*/
this.userSearch = new OCA.Search(this.search, this.resetSearch);
+
+ this.$nextTick(function () {
+ this.updateDefaultLabel();
+ });
},
computed: {
settings() {
@@ -274,6 +278,9 @@ export default {
this.$store.commit('resetUsers');
this.$refs.infiniteLoading.$emit('$InfiniteLoading:reset');
this.setNewUserDefaultGroup(val);
+ },
+ defaultQuotaValue: function () {
+ this.updateDefaultLabel();
}
},
methods: {
@@ -368,6 +375,17 @@ export default {
this.loading.groups = false;
});
return this.$store.getters.getGroups[this.groups.length];
+ },
+ updateDefaultLabel() {
+ let defaultLabel = undefined;
+
+ if (this.defaultQuotaValue.label === 'Unlimited') {
+ defaultLabel = '∞';
+ } else {
+ defaultLabel = this.defaultQuotaValue.label;
+ }
+
+ this.defaultQuota = {id: 'default', label: defaultLabel + ' (default)'};
}
}
}
diff --git a/settings/src/components/userList/userRow.vue b/settings/src/components/userList/userRow.vue
index 138f855eaf06d..754afe881b7f8 100644
--- a/settings/src/components/userList/userRow.vue
+++ b/settings/src/components/userList/userRow.vue
@@ -234,12 +234,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 === 'default') {
+ } else if (this.user.quota.quota === 0 || this.user.quota.quota === 'default') {
// default quota is replaced by the proper value on load
return this.quotaOptions[0];
}
diff --git a/settings/src/views/Users.vue b/settings/src/views/Users.vue
index b213e234f326d..55d9bcd47c151 100644
--- a/settings/src/views/Users.vue
+++ b/settings/src/views/Users.vue
@@ -52,7 +52,7 @@
-
+