feat: add font management section to the admin settings - #142
Conversation
8a79a2d to
67a0add
Compare
TL;DRThe controller and UI are competently built — admin-gated twice over, short-lived Findings, ranked1. High — the AdminPanel isn't running on the deployments this targets. The standalone image ships 2. High — hard-coupled to server#41 while server#39 implements the same API differently. This client speaks #41's contract: 3. Medium (security) — 4. Medium (functional) — Regenerate is disabled when the font list is empty. 5. Low — empty-secret path fails opaquely. With no JWT secret configured on the connector, 6. Low — APCu token cache ignores secret rotation. 7. Nits. Fine — not raising: the double admin gate (framework + explicit Bottom line: fix the CSRF attributes and the empty-list regenerate before merge; resolve the #39/#41 server duplication before merge; and decide what the admin experience is on deployments where the AdminPanel is disabled, because right now that's most of them. |
67a0add to
24bf255
Compare
|
TL;DR: 3 of 4 items from the prior review round are cleanly fixed (CSRF attributes removed correctly, empty-list regenerate bug, redundant
Detail1. Opaque-secret-error fix doesn't cover the path that needs it (
Suggested fix: make 2. Custom Fonts UI exposed in demo mode against shared demo infrastructure
3. Unverified cross-repo wire contract change
|
24bf255 to
cfa7529
Compare
Verified |
|
TL;DR: The opaque-error fix and the empty-list regenerate fix are both solid — confirmed across all 5 controller endpoints plus the Vue catch block. The demo-mode fix is cosmetic only: the controller itself still has no demo awareness, currently inert only because of an empty-string TODO elsewhere. DetailFixed — confirmed:
Still open — demo-mode gate is template-only, not enforced server-side:
Still unconfirmed: The New finding:
Nits, non-blocking: |
PHP's rawurlencode() is RFC 3986 encoding; the server receives it and calls decodeURIComponent() at router.js:318, which is the exact inverse. The comma-split and path.basename() run after decoding. |
adds a section with options to upload and delete custom fonts adds a button to regenerate available fonts based on the list of currently uploaded ones Signed-off-by: dsyzov <dmytro.syzov@nextcloud.com>
cfa7529 to
44aafe3
Compare
moodyjmz
left a comment
There was a problem hiding this comment.
All three open items resolved. Demo mode now has a real server-side guard (requireNotDemo() on all five controller actions), independent of the unrelated DEMO_PARAM["ADDR"] TODO that made the earlier fix only contingent. The X-Font-Name encode/decode contract with server#41 checks out — traced it into the actual router code this time rather than taking "Verified" at face value. Stray build artifact is gone. Approving.
Adds a section with options to upload and delete custom fonts
New files
lib/Controller/FontController.php
Admin-only Nextcloud controller that proxies font management requests to the EuroOffice DocumentServer AdminPanel API (/admin/api/v1/fonts).
src/views/FontManager.vue
Vue component rendered in the EuroOffice admin settings page.
css/eurooffice-listener.css
Built CSS artifact accompanying the Vue component.
Modified files
appinfo/routes.php
Registers five new routes under ajax/fonts/ - index, upload, delete, regenerate, getStatus
lib/DocumentService.php
Added delete to the HTTP methods supported by the shared request() helper.
src/settings.js / templates/settings.php
Wire the FontManager component into the existing EuroOffice admin settings page.
npm-shrinkwrap.json
Lockfile updated to reflect any dependency changes from the Vue component additions.
Notes
Assisted-by: Claude Code (Opus-4.8)