24cc5fd0f0
Add IApiKeyAdminStore.DeleteAsync that only deletes already-revoked rows (active keys must be revoked first so the revoke event lands in the audit log before the row disappears) and a matching admin-gated DashboardApiKeyManagementService.DeleteAsync. ApiKeysPage now shows Delete on revoked rows in place of the old "No actions" stub, and Rotate/Revoke/Delete all route through ConfirmDialog so each destructive action requires an explicit confirmation step. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
29 lines
821 B
C#
29 lines
821 B
C#
using System.Security.Claims;
|
|
|
|
namespace ZB.MOM.WW.MxGateway.Server.Dashboard;
|
|
|
|
public interface IDashboardApiKeyManagementService
|
|
{
|
|
bool CanManage(ClaimsPrincipal user);
|
|
|
|
Task<DashboardApiKeyManagementResult> CreateAsync(
|
|
ClaimsPrincipal user,
|
|
DashboardApiKeyManagementRequest request,
|
|
CancellationToken cancellationToken);
|
|
|
|
Task<DashboardApiKeyManagementResult> RevokeAsync(
|
|
ClaimsPrincipal user,
|
|
string keyId,
|
|
CancellationToken cancellationToken);
|
|
|
|
Task<DashboardApiKeyManagementResult> RotateAsync(
|
|
ClaimsPrincipal user,
|
|
string keyId,
|
|
CancellationToken cancellationToken);
|
|
|
|
Task<DashboardApiKeyManagementResult> DeleteAsync(
|
|
ClaimsPrincipal user,
|
|
string keyId,
|
|
CancellationToken cancellationToken);
|
|
}
|