Read roles declared with the Roles constructor form - #2419
Conversation
#2381) The role extraction only inspected named arguments, so the idiomatic [Roles("...")] attribute — which sets Roles via a params string[] constructor — yielded no roles. Also read the constructor argument array so both the constructor and named-argument forms produce roles. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01B1mrPcRT2GYjRxrx4T1p8N
Cratis.Arc.Authorization and Microsoft.AspNetCore.Authorization both declare an Authorize attribute, so importing both left every use of it ambiguous and the fixture did not compile. The named-argument form is the ASP.NET Core one, which is now written out in full. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Reviewer context — deliberately kept out of the description. Provenance. This is one commit extracted from #2417 ( It did not compile as written. #2417's reviewer note says it was authored in an environment without a .NET SDK and relies on CI. Cherry-picked onto The production change itself ( This is agent-authored code that no human has read. Do not merge without explicit review. Verification
Note on #2417. Four of its five commits duplicate work already in #2418, in overlapping files, so the two cannot both merge cleanly. Its |
Fixed
[Roles("...")]constructor form are read by the proxy generator, not only the named-argument form (Proxy generator drops roles declared via [Roles("...")] constructor form #2381)