Uh oh!
There was an error while loading. Please reload this page.
Add quota restrictions options - #28009
Conversation
julien-nc
commented
Jul 16, 2021
/compile amend / |
6972429 to
c5f72c5Comparec5f72c5 to
78c3c81Comparejulien-nc
commented
Jul 19, 2021
/compile amend / |
78c3c81 to
d26c684CompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| // if unlimited quota is not allowed => avoid getting 'unlimited' as default_quota fallback value | ||
| // use the first preset instead | ||
| $allowUnlimitedQuota = $this->config->getAppValue('files', 'allow_unlimited_quota', '1') === '1'; |
There was a problem hiding this comment.
Would be nice if that could be covered by some tests
There was a problem hiding this comment.
@juliushaertl Thanks for the review. I made an attempt to implement some tests in tests/lib/User/UserTest.php.
I'm having trouble to run those tests locally. I've played with
./autotest.sh sqlite lib/User/UserTest.php
but it always says Cannot open file "lib/User/UserTest".
Any idea or hint?
There was a problem hiding this comment.
Thanks a lot. Still not working when using autotest.sh. Nevermind, working fine with PhpStorm.
After a little fight with PhpUnit, here are 2 small tests 😁.
d4e6a65 to
b467c0aCompareartonge
commented
Jul 20, 2021
/compile amend / |
b467c0a to
8943546Comparejulien-nc
commented
Jul 28, 2021
I guess we can wait for #28202 |
8943546 to
ea77adaComparejulien-nc
commented
Jul 29, 2021
/compile amend / |
1 similar comment
Pytal
commented
Jul 29, 2021
/compile amend / |
…quota avoid unlimited quota as default_quota fallback value if unlimited quota is not allowed avoid getting/setting/displaying unlimited default quota if not allowed implement tests for unlimited quota restrictions Signed-off-by: Julien Veyssier <eneiluj@posteo.net> Signed-off-by: npmbuildbot-nextcloud[bot] <npmbuildbot-nextcloud[bot]@users.noreply.github.com>
ea77ada to
416d10fComparejulien-nc
commented
Jul 30, 2021
Drone CI failure is not related (missing dependencies in nodb step). |
julien-nc
commented
Jul 30, 2021
/backport to stable22 |
The backport to stable22 failed. Please do this backport manually. |

refs #21045
2 new Files app config options:
allow_unlimited_quotato toggle unlimited quotamax_quotato set the maximum quota that can be affected to usersA few things are taken care of:
default_quotafallback value (when not set). The first quota preset is used instead.Existing quota values and default quota are not affected by these changes. If the default quota or a user's quota has been set to unlimited, switching off unlimited quotas won't change the values. Only future affectations will be denied.
Quota presets are already configurable with the
quota_presetconfig value of the Files app.The remaining issue's item to address is
Feel free to add other reviewers 😁.