fix(settings): save the guest allowlist again and add a default quota selector#1602
fix(settings): save the guest allowlist again and add a default quota selector#1602ernolf wants to merge 1 commit into
Conversation
susnux
left a comment
There was a problem hiding this comment.
As per policy please add the AI disclosure to the commit:
https://github.com/nextcloud/.github/blob/master/AI_POLICY.md#disclosure
… selector - the allowlist NcSelect used @input, which @nextcloud/vue 9 no longer emits, so editing the allowed apps was never saved - rework the allowlist into a read-only chip list with an edit (pencil) button and a confirm (check) button that applies and saves; editing uses a draft, so closing the dropdown no longer saves - add a "Default quota for new guest accounts" selector (the preset-derived default shown with its value, Unlimited, common sizes, or a custom size with a required unit) - add Config getters/setters and SettingsController plumbing for guest_quota, reading the preset default via IAppConfig::getDetails() - cover the new quota config methods with unit tests - document the default quota and its Quick presets source in the README - fix three README links that still pointed to the removed `master` branch (now `main`) Assisted-by: ClaudeCode:claude-opus-4-8 Signed-off-by: ernolf <raphael.gradenwitz@googlemail.com>
d94246e to
c3539d3
Compare
Done ✅ — sorry, I wasn't aware of the policy. Added the Assisted-by: trailer to the commit and the PR-Text. Thanks for the pointer! |
|
Hello there, We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 Thank you for contributing to Nextcloud and we hope to hear from you soon! (If you believe you should not receive this message, you can add yourself to the blocklist.) |
Summary
Two changes to the Guests admin settings page (
src/views/GuestSettings.vueand the config plumbing behind it):1. Fix: allowlist changes are not saved
Fixes #1591. (This is also the allowlist-selector remainder of #995, which was closed after #1598 — but #1598 only fixed the on/off switches; the allowlist
NcSelectitself still used@input="saveConfig", which @nextcloud/vue 9 no longer emits, the same Vue 3 migration regression as #1323.) So editing the list of allowed apps sent noPUT /apps/guests/configand was lost on reload.The selector is reworked to match the inline-edit pattern used in the Accounts management:
NcSelect; edits go to a draft. A confirm (check) button applies the draft and saves. Closing the dropdown no longer saves on its own, and the save no longer relies on the dead@inputevent.2. Feature: default quota for new guest accounts
Adds a quota selector to the Guests tab, mirroring the Accounts quota field:
500→500 KB / 500 MB / 500 GB); a unit is required so the stored value is unambiguous.IAppConfig::getDetails(). Selecting it removes the override so the preset default applies again.Backend:
ConfiggainsgetGuestQuota(),hasGuestQuotaOverride(),getGuestQuotaDefault()andsetGuestQuota();SettingsController::getConfig()returnsguestQuota(thedefaultsentinel when no override is stored) andguestQuotaDefault, andsetConfig()accepts and validatesguestQuota(computerFileSize). The existingGuestManageralready appliesguest_quotaon guest creation, so no behaviour change there.Closes #1601
Testing
Notes
The allowlist fix is also relevant to the 4.7 line (same as fix(settings): use @update:modelValue so admin switches save again #1598); a backport may be wanted.
New user-facing strings are added in the usual places for translation.
Also corrects three README links that still pointed to the removed
masterbranch (nowmain).The content of this PR was partly generated using AI:
Assisted-by: ClaudeCode:claude-opus-4-8
Screenshots: