Skip to content

feat(preference): Allow apps to prevent admins from corrupting preferences via command line - #66034

Open
nickvergessen wants to merge 2 commits into
masterfrom
feat/noid/preference-validation
Open

nickvergessen wants to merge 2 commits into
masterfrom
feat/noid/preference-validation

Conversation

@nickvergessen

Copy link
Copy Markdown
Member

Assisted-by: ClaudeCode:claude-opus-5-5

Summary

  • In various cases user preferences are "magic values", e.g. talk has conversation list styles saved there and only valid values are compact or two-lines. This is correctly checked with BeforePreferenceSetEvent when a user sets it via provisioning_api API endpoints. However an admin can still way too easy/accidentally corrupt the entries via occ user:setting.
  • The change of this PR allows apps to also block it on that level. To be non-breaking, the check is relaxed on OCC calls to only block when explicitly denied.
  • Apps still should validate the issue, but at least an admin is notified when they tried to set an invalid value.

Checklist

AI (if applicable)

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

…ences via command line

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>

This branch has not been deployed

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants