Resolve all high-severity architecture review findings

This commit is contained in:
Joseph Doherty
2026-09-09 16:13:58 -04:00
parent 8bfe65512e
commit 146a13238f
192 changed files with 3160 additions and 753 deletions
@@ -1,3 +1,4 @@
using ZB.MOM.WW.ScadaBridge.CentralUI.Auth;
using Microsoft.AspNetCore.Components.Authorization;
using ZB.MOM.WW.ScadaBridge.Commons.Interfaces.Protocol;
using ZB.MOM.WW.ScadaBridge.Commons.Messages.Management;
@@ -45,7 +46,7 @@ public sealed class BrowseService : IBrowseService
{
// CentralUI-side role guard — sites don't enforce envelope-level roles,
// so the Designer check must happen here before any cross-cluster traffic.
var state = await _auth.GetAuthenticationStateAsync();
var state = await _auth.GetAuthoritativeStateAsync();
if (!state.User.HasClaim(JwtTokenService.RoleClaimType, Roles.Designer))
{
return new BrowseNodeResult(
@@ -100,7 +101,7 @@ public sealed class BrowseService : IBrowseService
// Same CentralUI-side role guard as BrowseChildrenAsync — sites don't
// enforce envelope-level roles, so the Designer check must happen here
// before any cross-cluster traffic.
var state = await _auth.GetAuthenticationStateAsync();
var state = await _auth.GetAuthoritativeStateAsync();
if (!state.User.HasClaim(JwtTokenService.RoleClaimType, Roles.Designer))
{
return new SearchAddressSpaceResult(