Alle ServiceInterfaces
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user