Skip to content

fix(settings): saving declarative settings fails for switches and personal forms - #66651

Merged
pringelmann merged 1 commit into
masterfrom
fix/declarative-settings-save
Nov 16, 2026
Merged

pringelmann merged 1 commit into
masterfrom
fix/declarative-settings-save

Conversation

@pringelmann

@pringelmann pringelmann commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Found these while porting the declarative forms to Vue 3 (#66640).

  • Switches and number fields in admin forms with internal storage throw a 500 on save. The frontend sends a number and setValueString() wants a string. Now cast to string, arrays saved as JSON.
  • Regular users get a 403 when saving a personal declarative form. SubadminMiddleware blocks them because setValue/setSensitiveValue lack #[NoSubAdminRequired]. Admin forms are still checked in the manager. Delegated admins in fix(DeclarativeSettings): Make declarative settings delegation aware #61864 run into the same 403.

TODO

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

Numbers from switches and number fields caused a 500 with internal storage. Lists are stored as JSON, like the frontend already sends them.

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Peter Ringelmann <peter.ringelmann@nextcloud.com>
@pringelmann

Copy link
Copy Markdown
Contributor Author

/backport to stable35

@pringelmann

Copy link
Copy Markdown
Contributor Author

/backport to stable34

@pringelmann

Copy link
Copy Markdown
Contributor Author

/backport to stable33

@pringelmann pringelmann added the 3. to review Waiting for reviews label Nov 16, 2026
@pringelmann
pringelmann marked this pull request as ready for review November 16, 2026 12:26
@pringelmann
pringelmann requested a review from a team as a code owner November 16, 2026 12:26
@pringelmann
pringelmann requested review from CarlSchwan and provokateurin and removed request for a team November 16, 2026 12:26
@pringelmann
pringelmann merged commit 912ff2f into master Nov 16, 2026
209 of 233 checks passed
@pringelmann
pringelmann deleted the fix/declarative-settings-save branch November 16, 2026 14:48
@backportbot

backportbot Bot commented Nov 16, 2026

Copy link
Copy Markdown

The backport to stable33 failed. Please do this backport manually.

# Switch to the target branch and update it
git checkout stable33
git pull origin stable33

# Create the new backport branch
git checkout -b backport/66651/stable33

# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick 4472dbfd

# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/66651/stable33

Error: Failed to check for changes with origin/stable33: No changes found in backport branch


Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

@backportbot

backportbot Bot commented Nov 16, 2026

Copy link
Copy Markdown

The backport to stable34 failed. Please do this backport manually.

# Switch to the target branch and update it
git checkout stable34
git pull origin stable34

# Create the new backport branch
git checkout -b backport/66651/stable34

# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick 4472dbfd

# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/66651/stable34

Error: Failed to check for changes with origin/stable34: No changes found in backport branch


Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

@backportbot

backportbot Bot commented Nov 16, 2026

Copy link
Copy Markdown

The backport to stable35 failed. Please do this backport manually.

# Switch to the target branch and update it
git checkout stable35
git pull origin stable35

# Create the new backport branch
git checkout -b backport/66651/stable35

# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick 4472dbfd

# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/66651/stable35

Error: Failed to check for changes with origin/stable35: No changes found in backport branch


Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

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.

4 participants