refactor(ui): rename AuditLog viewer to ConfigurationAuditLog under /audit/configuration (#23 M7)
The pre-M1 IAuditService config-change viewer moves out of the Monitoring nav group to make room for the new Audit nav group (issue #23 M7). The old route /monitoring/audit-log returns 404 (no redirect, per plan) — the viewer is now reachable at /audit/configuration and labelled "Configuration Audit Log" to disambiguate from the new Audit Log page (arriving in #23 M7-T9). Inbound references in NavMenu, Dashboard, and the Playwright nav tests are updated to the new route and label.
This commit is contained in:
@@ -108,11 +108,11 @@
|
|||||||
</Authorized>
|
</Authorized>
|
||||||
</AuthorizeView>
|
</AuthorizeView>
|
||||||
|
|
||||||
@* Audit Log — Admin only *@
|
@* Configuration Audit Log — Admin only *@
|
||||||
<AuthorizeView Policy="@AuthorizationPolicies.RequireAdmin">
|
<AuthorizeView Policy="@AuthorizationPolicies.RequireAdmin">
|
||||||
<Authorized Context="auditContext">
|
<Authorized Context="auditContext">
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<NavLink class="nav-link" href="/monitoring/audit-log">Audit Log</NavLink>
|
<NavLink class="nav-link" href="/audit/configuration">Configuration Audit Log</NavLink>
|
||||||
</li>
|
</li>
|
||||||
</Authorized>
|
</Authorized>
|
||||||
</AuthorizeView>
|
</AuthorizeView>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
@page "/monitoring/audit-log"
|
@page "/audit/configuration"
|
||||||
@using ScadaLink.Security
|
@using ScadaLink.Security
|
||||||
@using ScadaLink.CentralUI.Components
|
@using ScadaLink.CentralUI.Components
|
||||||
@using ScadaLink.Commons.Entities.Audit
|
@using ScadaLink.Commons.Entities.Audit
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
@inject IJSRuntime JS
|
@inject IJSRuntime JS
|
||||||
|
|
||||||
<div class="container-fluid mt-3">
|
<div class="container-fluid mt-3">
|
||||||
<h4 class="mb-3">Audit Log</h4>
|
<h4 class="mb-3">Configuration Audit Log</h4>
|
||||||
|
|
||||||
<ToastNotification @ref="_toast" />
|
<ToastNotification @ref="_toast" />
|
||||||
|
|
||||||
@@ -70,10 +70,10 @@
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-lg-4 col-md-6 col-12">
|
<div class="col-lg-4 col-md-6 col-12">
|
||||||
<a class="card h-100 text-decoration-none text-reset" href="/monitoring/audit-log">
|
<a class="card h-100 text-decoration-none text-reset" href="/audit/configuration">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="d-flex justify-content-between align-items-start">
|
<div class="d-flex justify-content-between align-items-start">
|
||||||
<h6 class="mb-1">Recent Audit Log</h6>
|
<h6 class="mb-1">Configuration Audit Log</h6>
|
||||||
<span class="text-muted">→</span>
|
<span class="text-muted">→</span>
|
||||||
</div>
|
</div>
|
||||||
<p class="text-muted small mb-0">Browse changes to configuration and deployments.</p>
|
<p class="text-muted small mb-0">Browse changes to configuration and deployments.</p>
|
||||||
|
|||||||
@@ -68,7 +68,6 @@ public class NavigationTests
|
|||||||
[InlineData("Health Dashboard", "/monitoring/health")]
|
[InlineData("Health Dashboard", "/monitoring/health")]
|
||||||
[InlineData("Event Logs", "/monitoring/event-logs")]
|
[InlineData("Event Logs", "/monitoring/event-logs")]
|
||||||
[InlineData("Parked Messages", "/monitoring/parked-messages")]
|
[InlineData("Parked Messages", "/monitoring/parked-messages")]
|
||||||
[InlineData("Audit Log", "/monitoring/audit-log")]
|
|
||||||
public async Task MonitoringNavLinks_NavigateCorrectly(string linkText, string expectedPath)
|
public async Task MonitoringNavLinks_NavigateCorrectly(string linkText, string expectedPath)
|
||||||
{
|
{
|
||||||
var page = await _fixture.NewAuthenticatedPageAsync();
|
var page = await _fixture.NewAuthenticatedPageAsync();
|
||||||
|
|||||||
@@ -158,16 +158,16 @@ public class RoleNavigationTests
|
|||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public async Task DeploymentUser_SeesMonitoringButNotAuditLog()
|
public async Task DeploymentUser_SeesMonitoringButNotConfigurationAuditLog()
|
||||||
{
|
{
|
||||||
var page = await _fixture.NewAuthenticatedPageAsync("deployer", "password");
|
var page = await _fixture.NewAuthenticatedPageAsync("deployer", "password");
|
||||||
|
|
||||||
// Event Logs and Parked Messages are Deployment-role gated, so a
|
// Event Logs and Parked Messages are Deployment-role gated, so a
|
||||||
// Deployment user sees them; Audit Log is Admin-only.
|
// Deployment user sees them; Configuration Audit Log is Admin-only.
|
||||||
await AssertNavLinkVisible(page, "Health Dashboard");
|
await AssertNavLinkVisible(page, "Health Dashboard");
|
||||||
await AssertNavLinkVisible(page, "Event Logs");
|
await AssertNavLinkVisible(page, "Event Logs");
|
||||||
await AssertNavLinkVisible(page, "Parked Messages");
|
await AssertNavLinkVisible(page, "Parked Messages");
|
||||||
await AssertNavLinkHidden(page, "Audit Log");
|
await AssertNavLinkHidden(page, "Configuration Audit Log");
|
||||||
}
|
}
|
||||||
|
|
||||||
// ── Multi-role user (Admin + Design + Deployment) ───────────────
|
// ── Multi-role user (Admin + Design + Deployment) ───────────────
|
||||||
|
|||||||
Reference in New Issue
Block a user