Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable9] Fix default quota #28302

Merged
merged 2 commits into from
Jul 5, 2017
Merged

[stable9] Fix default quota #28302

merged 2 commits into from
Jul 5, 2017

Conversation

PVince81
Copy link
Contributor

@PVince81 PVince81 commented Jul 5, 2017

Backport of #27896 to stable9

Supersedes #27957

Please review @DeepDiver1975 @jvillafanez @Gomez

TODO: manual retest:

  • TEST: newly created user gets "default" quota, properly applies in personal page, 5 GB
  • TEST: set existing user quota to "default", properly applies in personal page, 5 GB
  • TEST: set existing user quota to "unlimited", properly applies in personal page (unlimited)
  • TEST: set existing user quota to "1 GB", properly applies in personal page, 1 GB

Vincent Petry added 2 commits July 5, 2017 10:51
User::getQuota() and User::setQuota() are now reading the exact value as
set in the database instead of interpreting it. This is how it used to
behave.

Util::getUserQuota() is the method that interprets the quota for example
by replacing a default value with the default quota value from the app
config.
if ($userQuota === null || $userQuota === 'default') {
$userQuota = \OC::$server->getConfig()->getAppValue('files', 'default_quota', 'none');
}
if ($userQuota === null || $userQuota === 'none') {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$userQuota === null won't happen ever I think. Not a big deal anyway.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm indeed, missed that in the original port (might even have been part of the original code I reverted)

@jvillafanez
Copy link
Member

👍

@PVince81 PVince81 merged commit 9b38c9d into stable9 Jul 5, 2017
@PVince81 PVince81 deleted the stable9-fixdefaultquota branch July 5, 2017 11:48
@lock
Copy link

lock bot commented Aug 3, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants