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

オープン
#3,432 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
54/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
csharp, openapi

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
C#
スター
567
フォーク
107
平均マージ
1時間 19分
マージ済み PR(30日)
353

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

fluentcms/FluentCMS のほかの issue

fluentcms/FluentCMS の issue をすべて見る

似ている issue

C# の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。