The schema does not say whether a type has a preview template, so the admin mints a token to learn it

Aperta
#3,432 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
54/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
csharp, openapi

Direzione di ricerca

Start by tracing the Management API's GET /schema response and how it derives the existing localizable and searchable fields. Check how PreviewSettings identifies templates and how permission checks affect preview token minting; acceptance requires previewable to reflect setting changes and return false when the caller lacks permission. Then update the OpenAPI document and both generated clients, and verify the response and client schemas.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

area:api area:publishing type:feature

Problem

The admin cannot tell whether a content type has a preview template without minting a preview token. The templates are a setting of the site (PreviewSettings), and GET /schema says nothing about them, so the content form mints a token on every read and every save of any type to learn it (#3403, from the review of #3401). A preview token cannot be revoked, so each of these mints is a credential nobody asked for.

Proposal

Say on each type of the Management API's GET /schema whether the site has a preview template for it, as a boolean named previewable, in the style of localizable and searchable, which the admin already reads (#3437), narrowed as the rest of the answer is (a caller who may not mint a preview token for the type gets false). It adds to an answer and changes no model. The OpenAPI document and the generated clients take the member.

Until it is merged the admin mints only when the preview pane opens, for any type, and reads the member when it is there (#3403).

Acceptance

  • GET /schema says for each type whether the site has a preview template for it, and follows a change of the setting
  • A caller who may not mint a preview token for the type reads false
  • The OpenAPI document and the two clients have the member

For workstation B (#3356). Asked for by #3403.

Lingua principale
C#
Stelle
567
Fork
107
Merge medio
1h 19m
PR unite (30g)
353

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di fluentcms/FluentCMS

Tutte le issue di fluentcms/FluentCMS

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.