Skip to content
This repository was archived by the owner on May 29, 2026. It is now read-only.

feat(preferences): generic per-user preferences endpoint#299

Merged
rubenvdlinde merged 1 commit into
developmentfrom
feat/preferences-endpoint
May 25, 2026
Merged

feat(preferences): generic per-user preferences endpoint#299
rubenvdlinde merged 1 commit into
developmentfrom
feat/preferences-endpoint

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Contributor

Summary

Adds a generic per-user key/value preferences endpoint to softwarecatalog, mirroring the change already merged in pipelinq#553 and decidesk#266.

  • New PreferencesController backed by Nextcloud IConfig user values.
  • Two routes: GET /api/preferences/{key} and PUT /api/preferences/{key}.
  • Used by shared @conduction/nextcloud-vue widgets (e.g. CnSupportDialog's seen flag) to persist small per-user UI flags cross-device.

Security

Keys are sanitised to [a-z0-9-] (max 64 chars) and namespaced under pref_, so callers cannot reach arbitrary IConfig user values. Endpoints require an authenticated user.

Checks

  • php -l: clean
  • phpcs --standard=phpcs.xml: 0 errors (only advisory @SPEC warnings)

Add a generic per-user key/value preferences endpoint backed by
Nextcloud IConfig user values. Used by shared @conduction/nextcloud-vue
widgets (e.g. CnSupportDialog) to persist small per-user UI flags
cross-device without a bespoke endpoint per feature.

Keys are sanitised to a safe charset and namespaced under pref_ so
callers cannot reach arbitrary IConfig user values.
@rubenvdlinde rubenvdlinde merged commit 57039c3 into development May 25, 2026
5 of 15 checks passed
@rubenvdlinde rubenvdlinde deleted the feat/preferences-endpoint branch May 25, 2026 21:32
@github-actions

Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/softwarecatalog @ e165e1c

Check PHP Vue Security License Tests
lint
phpcs
phpmd
psalm
phpstan
phpmetrics
eslint
stylelint
composer
npm ❌ 2/774 denied
PHPUnit ⏭️
Newman ⏭️
Playwright ⏭️

❌ Denied npm licenses

Package Version License
pako 1.0.11 (MIT AND Zlib)
sha.js 2.4.12 (MIT AND BSD-3-Clause)

Quality workflow — 2026-05-25 21:33 UTC

Download the full PDF report from the workflow artifacts.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant