c5e7479ee4
Add IDashboardSessionAdminService (Admin-role gate, friendly errors, audit logging) wrapping a new ISessionManager.KillWorkerAsync that skips graceful shutdown and cleans up registry/metrics. Sessions, Workers, and SessionDetails pages render Close / Kill buttons only when CanManage; the service re-checks the role on every call so forged clicks return Unauthenticated. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
17 lines
432 B
C#
17 lines
432 B
C#
namespace ZB.MOM.WW.MxGateway.Server.Dashboard;
|
|
|
|
public sealed record DashboardSessionAdminResult(
|
|
bool Succeeded,
|
|
string Message)
|
|
{
|
|
public static DashboardSessionAdminResult Success(string message)
|
|
{
|
|
return new DashboardSessionAdminResult(true, message);
|
|
}
|
|
|
|
public static DashboardSessionAdminResult Fail(string message)
|
|
{
|
|
return new DashboardSessionAdminResult(false, message);
|
|
}
|
|
}
|