Purge: refuse to purge a live post without confirmation

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

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

評価

難易度
3/5
見積もり時間
1〜3時間
初心者へのやさしさ
62/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
markdown, sqlite, typescript
領域
backend, content

調査の方向性

Start with purgePost in src/lib/server/content.ts, which deletes a post's rows, and check how the publish step decides what leaves the site. Add a guard that refuses to purge a live post unless it is unpublished or a confirmation is passed. The check goes in src/lib/server/content.check.ts: a live post without confirmation is refused, and a draft purges normally. Done when that check passes and the confirmation text says the page disappears at the next publish.

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

説明

Context

purgePost in src/lib/server/content.ts removes a post's rows. When the post is live, the next publish removes it from the site with no status check, so one stray click can unpublish a page.

Scope

  • Purging a live post requires it to be unpublished first, or an explicit second confirmation that names the consequence.
  • The Publish view lists posts that will be removed from the site.

Acceptance criteria

  • A check in src/lib/server/content.check.ts: purging a live post without confirmation is refused; purging a draft works.
  • The confirmation text states that the page disappears from the site at the next publish.

Estimate: about 2 hours.

主要言語
HTML
スター
0
フォーク
0
平均マージ
1分
マージ済み PR(30日)
2

環境構築

はじめの一歩

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

mrgnw/cfcms のほかの issue

mrgnw/cfcms の issue をすべて見る

似ている issue

Backend & API Design の issue をもっと見る

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

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