Skip to content

feat(settings): add a default quota selector for new guest accounts - #1618

Merged
ernolf merged 2 commits into
mainfrom
ernolf/feat/default-guest-quota
Jul 3, 2026
Merged

ernolf merged 2 commits into
mainfrom
ernolf/feat/default-guest-quota

Conversation

@ernolf

@ernolf ernolf commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a default quota for new guest accounts, configurable from the Guests tab.

This is the second part of #1602, which was split in two: the allowlist regression fix landed separately as #1616, and this PR carries the quota feature.

Feature

  • Quota selector on the Guests tab, mirroring the Accounts quota field: Default (…), Unlimited, 1 GB / 5 GB / 10 GB, or a typed custom value. Typing a number offers it with selectable units (e.g. 500 becomes 500 KB / 500 MB / 500 GB); a unit is required so the stored value is unambiguous.
  • The Default option shows the actual preset-derived value (e.g. "Default (1 GB)"), read from the config lexicon via IAppConfig::getKeyDetails(). Selecting it removes the override so the preset default applies again, and the label follows the active Quick preset even while an override is set.

Backend: Config gains getGuestQuota(), hasGuestQuotaOverride(), getGuestQuotaDefault() and setGuestQuota(); SettingsController::getConfig() returns guestQuota (the default sentinel when no override is stored) and guestQuotaDefault, and setConfig() accepts and validates guestQuota. GuestManager already applies guest_quota on guest creation, so guest behaviour is unchanged.

Docs

Documents the default guest quota in the README and corrects three links that still pointed to the removed master branch.

Closes #1601

Testing

  • Pick a preset, Unlimited, or a typed size, reload: the value persists.
  • "Default (…)" removes the override; a bare number without a unit is rejected.
  • Switching the Quick preset updates the "Default (…)" label, including when an override is currently stored.

🤖 AI (if applicable)

  • The content of this PR was partly generated using AI
    Assisted-by: ClaudeCode:claude-opus-4-8

Screenshots:

image
image
image

ernolf added 2 commits July 3, 2026 14:40
- add a quota selector to the Guests tab mirroring the Accounts quota field: Default, Unlimited, preset sizes, or a typed custom value with a required unit
- the Default option shows the preset-derived value read via IAppConfig::getKeyDetails() and follows the active Quick preset; selecting it removes the override
- SettingsController exposes and validates guestQuota; GuestManager already applies guest_quota on creation, so guest behaviour is unchanged

Closes #1601

Assisted-by: ClaudeCode:claude-opus-4-8
Signed-off-by: ernolf <raphael.gradenwitz@googlemail.com>
Signed-off-by: ernolf <raphael.gradenwitz@googlemail.com>
@ernolf
ernolf requested a review from pringelmann July 3, 2026 12:56
@ernolf
ernolf enabled auto-merge July 3, 2026 13:06

@pringelmann pringelmann left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you, lgtm!

@ernolf
ernolf merged commit dc376a0 into main Jul 3, 2026
54 of 55 checks passed
@ernolf
ernolf deleted the ernolf/feat/default-guest-quota branch July 3, 2026 13:43
@github-actions

Copy link
Copy Markdown
Contributor

Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

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.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow setting the default quota for new guest accounts from the Guests settings

2 participants