Alle ServiceInterfaces

This commit is contained in:
2025-02-19 16:47:29 +01:00
parent 8170603a42
commit 87ae369550

View File

@@ -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<RequirePermissionAttribute>();
if (attribute != null)
{
var t = typeof(IGkvAccountingService);
var methodInfo = t.GetMethod(methodName);
var attribute = methodInfo.GetCustomAttribute<RequirePermissionAttribute>();
if (attribute != null)
{
return attribute.HasPermission(rights);
}
return attribute.HasPermission(rights);
}
}
catch (Exception e)