From 87ae3695501b0975b98e75dae46e09a2467765b1 Mon Sep 17 00:00:00 2001 From: Rene Evertz Date: Wed, 19 Feb 2025 16:47:29 +0100 Subject: [PATCH] Alle ServiceInterfaces --- Service/Security/SecurityContextInitializer.cs | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/Service/Security/SecurityContextInitializer.cs b/Service/Security/SecurityContextInitializer.cs index 20c30d35b..f4fbbbdc7 100644 --- a/Service/Security/SecurityContextInitializer.cs +++ b/Service/Security/SecurityContextInitializer.cs @@ -135,15 +135,13 @@ namespace BeWo.Service.Security try { - if (serviceInterface == "IGkvAccountingService" && methodName == "GetFilteredGkvAbrechnungen") + var name = $"BeWo.Service.ServiceContracts.{serviceInterface}"; + var t = Type.GetType(name); + var methodInfo = t.GetMethod(methodName); + var attribute = methodInfo.GetCustomAttribute(); + if (attribute != null) { - var t = typeof(IGkvAccountingService); - var methodInfo = t.GetMethod(methodName); - var attribute = methodInfo.GetCustomAttribute(); - if (attribute != null) - { - return attribute.HasPermission(rights); - } + return attribute.HasPermission(rights); } } catch (Exception e)