Admin: Audit page — browse who changed what through the central manager's admin endpoints

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

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

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

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
typescript

調査の方向性

Start by checking the central-manager audit endpoint in HarperFast/central-manager#1023 and how Studio currently reads permissions from GET /User/current and builds its admin pages. Then trace the admin routes for organizations, plans, regions, configuration, and users to scope the list, filters, record links, and history links. Done means an authorized user can browse paged audit entries and their changes, while users without audit:read do not see the navigation or history links; the issue names no Studio files or tests.

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

説明

Problem

HarperFast/central-manager#1023 adds an audit history of every staff change made through the central manager's /Admin endpoints: who made it, when, which endpoint, whether it created, updated, deleted, or ran an operation, which record it touched, and the before and after values of only the attributes that changed. It is served at GET /Admin/Audit/.

Without a Studio page, reading that history means writing authenticated requests to the central manager by hand. That defeats the point of an audit trail, which is answering "who changed this, and what was it before?" quickly, often during an incident.

Proposal

An Audit page in the Studio admin section (/admin/audit), built on GET /Admin/Audit/:

  • List history entries newest first, paged using the endpoint's limits. Each row shows when, the staff member, the endpoint, the action, and the record it touched.
  • Changes. Expanding an entry shows its changed attributes as before → after. A created record shows only "after", a deleted one only "before", and an operation (for example a move or a fleet upgrade) shows the request it was started with.
  • Filters for staff member, endpoint, action, table, record id, and a date range.
  • History from the record. The existing admin pages for organizations, plans, regions, configuration and users get a "History" link. It opens this page filtered to that record.
  • Links back. Where an entry's record has an admin page, its id links there.

Viewing needs the new audit:read permission, held by fabric_admin and the core super user. Studio hides the nav entry and the "History" links from accounts without it, reading permissions from GET /User/current. The central manager enforces the permission either way.

Out of scope

  • Exporting history (CSV and similar).
  • Live updates while the page is open.

Depends on HarperFast/central-manager#1023.

🤖 Generated by Claude (Anthropic) via Claude Code; posted via @Devin-Holland.

主要言語
TypeScript
スター
5
フォーク
4
平均マージ
2日 13時間
マージ済み PR(30日)
60

環境構築

はじめの一歩

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

HarperFast/studio のほかの issue

HarperFast/studio の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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