From fa30ebecfa11551f19615251ffc4ddff5817e722 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole=20J=C3=B8rgen=20Skogstad?= Date: Tue, 28 Jan 2025 12:50:52 +0100 Subject: [PATCH] fix: Use correct type filter for LocalDevelopmentUser (#1744) ## Description ## Related Issue(s) - #1743 ## Verification - [ ] **Your** code builds clean without any errors or warnings - [ ] Manual testing done (required) - [ ] Relevant automated test added (if you find this hard, leave it and we'll help out) ## Documentation - [ ] Documentation is updated (either in `docs`-directory, Altinnpedia or a separate linked PR in [altinn-studio-docs.](https://github.com/Altinn/altinn-studio-docs), if applicable) --- .../Common/Authorization/AuthorizationPolicy.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Digdir.Domain.Dialogporten.WebApi/Common/Authorization/AuthorizationPolicy.cs b/src/Digdir.Domain.Dialogporten.WebApi/Common/Authorization/AuthorizationPolicy.cs index c50ed6b5c..6227ad06c 100644 --- a/src/Digdir.Domain.Dialogporten.WebApi/Common/Authorization/AuthorizationPolicy.cs +++ b/src/Digdir.Domain.Dialogporten.WebApi/Common/Authorization/AuthorizationPolicy.cs @@ -24,7 +24,7 @@ internal static class AuthorizationScope private static ReadOnlyCollection GetAll() => typeof(AuthorizationScope) .GetFields() - .Where(x => x.IsLiteral && !x.IsInitOnly && x.DeclaringType == typeof(string)) + .Where(x => x.IsLiteral && !x.IsInitOnly && x.FieldType == typeof(string)) .Select(x => (string)x.GetRawConstantValue()!) .ToList() .AsReadOnly();