This repository was archived by the owner on May 29, 2026. It is now read-only.
feat(Schema): whitelist defaultAutoShare boolean configuration key#1944
Merged
Merged
Conversation
`Schema::validateConfigurationArray()` strips any configuration key not in its allow-list. Adds `defaultAutoShare` to the `$boolFields` whitelist so schemas can persist the new key without it being silently dropped on save. Read by the attachment-upload dialog (CnFilesTab in @conduction/nextcloud-vue, and UploadFiles.vue in opencatalogi) to seed the "Automatically publish" toggle. true = toggle on by default; absent / false = toggle off (existing behaviour). Users can override per upload — the schema value never coerces the final submitted `share` field. Companion to: - ConductionNL/nextcloud-vue#455 (CnFilesTab share toggle) - ConductionNL/opencatalogi#723 (UploadFiles legacy modal parity) Closes ConductionNL/opencatalogi#577 (backend half). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This was referenced May 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
lib/Db/Schema.php::validateConfigurationArray()strips any configuration key not in its allow-list. AddsdefaultAutoShareto the$boolFieldswhitelist so schemas can persist the new key without it being silently dropped on save.setConfiguration()'s PHPDoc.Why
Read by the attachment-upload dialog (CnFilesTab in
@conduction/nextcloud-vue, and the legacyUploadFiles.vuein opencatalogi) to seed the "Automatically publish" toggle from per-schema configuration.true= toggle on by default; absent /false= off (existing behaviour). Users can always override per upload — the schema value never coerces the submittedsharefield.Without this whitelist entry, every PUT that includes
configuration.defaultAutoSharereturns 200 but the key is dropped server-side, so the consumer never sees the value. Verified bycurl -X PUT … -d '{"configuration": {…, "defaultAutoShare": true}}': before this change the response body'sconfigurationobject had nodefaultAutoShare; after this change it round-trips intact.Companion PRs
CnFilesTabshare toggle (active user-facing surface, rendered insideCnObjectSidebar's Files tab)UploadFiles.vuelegacy modal parity + openspec changeCloses ConductionNL/opencatalogi#577 (backend half).
Backward compatibility
defaultAutoSharecontinue to behave exactly as before (validator drop = no key = treated as off downstream).configurationcolumn is already JSON. Existing persisted configs are untouched.Test plan
PUT /api/schemas/{id}withconfiguration.defaultAutoShare: true— response body now contains the key (verified locally)defaultAutoShare: trueset on a schema, theCnFilesTabupload dialog seeds the "Automatically publish" toggle on (verifies end-to-end once the nextcloud-vue PR is released)🤖 Generated with Claude Code