fix(management): reconcile area role gate to Designer|Deployer across actor and all three docs (arch-review C6)

Claude-Session: https://claude.ai/code/session_01MtdgwpEeCUn6cUA5f1LMPj
This commit is contained in:
Joseph Doherty
2026-07-10 05:23:57 -04:00
parent 75bf14a35a
commit 51cff07753
5 changed files with 50 additions and 6 deletions
@@ -167,6 +167,15 @@ public class ManagementActor : ReceiveActor
private static readonly string[] OperatorOnly = [Roles.Operator];
private static readonly string[] VerifierOnly = [Roles.Verifier];
// arch-review C6: area management is reconciled to any-of [Designer, Deployer].
// Areas are authored on both real surfaces — the Designer template/topology
// tooling AND the Central UI Deployment Topology workflow (Topology.razor is
// RequireDeployment) — so a pure Deployer must be able to create/update/delete
// them. The three requirements docs' historical "Administrator" assignment was
// stale; Administrator is not implicitly included here, matching the actor's
// any-of treatment of every other Designer/Deployer command.
private static readonly string[] AreaManagers = [Roles.Designer, Roles.Deployer];
// arch-review UA1: the Secured Writes history table exposes
// process-sensitive tag values, so reading it is restricted to the
// two-person Secured Write roles plus Administrator (any-of) — NOT any
@@ -205,9 +214,13 @@ public class ManagementActor : ReceiveActor
or UpdateSmtpConfigCommand
or UpdateSmsConfigCommand => AdminOnly,
// Area management — any-of [Designer, Deployer] (arch-review C6).
// Exposed both in the Designer tooling and inside the Central UI
// Deployment Topology workflow (RequireDeployment), so both roles qualify.
CreateAreaCommand or UpdateAreaCommand or DeleteAreaCommand => AreaManagers,
// Designer operations
CreateAreaCommand or DeleteAreaCommand
or CreateTemplateCommand or UpdateTemplateCommand or DeleteTemplateCommand
CreateTemplateCommand or UpdateTemplateCommand or DeleteTemplateCommand
or ValidateTemplateCommand
or CreateExternalSystemCommand or UpdateExternalSystemCommand
or DeleteExternalSystemCommand
@@ -227,7 +240,6 @@ public class ManagementActor : ReceiveActor
or CreateSharedSchemaCommand or UpdateSharedSchemaCommand or DeleteSharedSchemaCommand
or CreateDatabaseConnectionDefCommand or UpdateDatabaseConnectionDefCommand or DeleteDatabaseConnectionDefCommand
or CreateApiMethodCommand or UpdateApiMethodCommand or DeleteApiMethodCommand
or UpdateAreaCommand
or CreateTemplateFolderCommand or RenameTemplateFolderCommand
or MoveTemplateFolderCommand or ReorderTemplateFolderCommand or DeleteTemplateFolderCommand
or MoveTemplateToFolderCommand