2.5 KiB
OT05 residual list action policies
The written chapter refinement authorizes exactly ClusterAcls and ClustersList after their grammar commit1fe4dbf5. The three authoring destinations now use the exact existing ConfigEditor policy already enforced by AclEdit/NewCluster: New ACL grant, row Edit, New cluster. Read-authorized list pages, row data, service queries, route attributes, parameters and C# bodies stay unchanged. Empty cluster guidance advertises creation only to users who can follow that action.
A new real-policy-engine rendered theory in NavigationPolicyRenderTests seeds a disposable EF InMemory cluster/ACL, installs ConfigEditor RequireRole(Administrator,Designer), and uses actual role claims. Viewer/Operator must retain readable cluster/ACL data but receive none of the three edit/create links; Designer/Administrator retain each. It also reflects the actual destination page policy. No mocked always-authorized service or operational persistence.
Valid baseline: four role cases, two negative failures/two positive passes. After the bounded gates: all four pass. Aggregate NavigationPolicyRenderTests + ClusterOverviewActionPolicyTests + PageAuthorizationGuardTests + DeleteConfirmRenderTests + SecretsNavLinkTests 26/26 pass, zero skips. Raw red/green retained. Command from repository root:
dotnet test tests/Server/ZB.MOM.WW.OtOpcUa.AdminUI.Tests/ZB.MOM.WW.OtOpcUa.AdminUI.Tests.csproj --artifacts-path /tmp/ot04-05-artifacts --filter 'FullyQualifiedName~NavigationPolicyRenderTests|FullyQualifiedName~ClusterOverviewActionPolicyTests|FullyQualifiedName~PageAuthorizationGuardTests|FullyQualifiedName~DeleteConfirmRenderTests|FullyQualifiedName~SecretsNavLinkTests'
Source guard confirms exact route/page-policy directives and entire C# blocks preserved against committed grammar. This is a narrow discoverability/policy follow-up; no new navigation mechanics or browser behavior were introduced, and the existing12scene navigation browser proof is not claimed as rendering these newly gated pages. Integration full suite remains coordinated separately. No real service operation, live gateway, deployment, or shared ledger change.
Parent review refinement: both Actions column header and every row action cell use the same ConfigEditor gate. Real-role tests assert matching6column reader/7column editor header and row geometry. The actionable ACL re-pick instruction follows the same policy; the unresolved explanation remains readable. Aggregate26/26 remains green after this final change.