using System.Security.Claims; namespace ZB.MOM.WW.MxGateway.Server.Dashboard; /// /// Decides whether a dashboard principal may observe one session's mirrored /// event stream (SEC-25 / TST-15). Consulted at every subscribe seam: the /// SignalR EventsHub.SubscribeSession join and the in-process /// IDashboardSessionEventSubscriber.Subscribe used by the /// session-details page. /// /// /// The dashboard authenticates LDAP users while sessions are owned by API keys — /// two disjoint identity domains — so the bridge is the session tag: a /// session inherits its owning key's tags, and a dashboard group grants tags via /// MxGateway:Dashboard:GroupToTag. See /// docs/plans/2026-07-10-dashboard-session-acl-tst15.md. /// public interface IDashboardSessionAcl { /// /// Returns whether may observe the events of the /// session identified by . /// /// /// The dashboard caller. , unauthenticated, or claim-less /// principals (including the anonymous-localhost path) are treated as Viewers /// holding an empty tag grant. /// /// Session id the caller wants to observe. /// when the caller may observe the session; otherwise . bool CanViewSession(ClaimsPrincipal? principal, string sessionId); }