Repository navigation
Release v22.20.0
Added
- Analyzer
ARC0019reports[AllowAnonymous]declared on the same class or method as[Authorize]or[Roles]. Arc resolves that contradiction differently depending on evaluator order — rejecting the call in one order and admitting anonymous callers in the other — so the declaration now fails loudly at build time instead. Overriding a class on one query method is supported and not reported (#2714) - Analyzer
ARC0020reports[Authorize]or[AllowAnonymous]fromMicrosoft.AspNetCore.Authorizationon a model-bound[Command]or[ReadModel]. Arc enforces only its ownCratis.Arc.Authorizationattributes on model-bound artifacts, so the ASP.NET Core attribute protects nothing: a command marked with it is open to every caller. Use the Arc attribute of the same name. Controller-based commands and queries are unaffected (#2719)
Both rules are warnings. A project that treats warnings as errors will fail to build where either applies — which, for ARC0020, is a command or query that is currently unprotected.