This commit is contained in:
@@ -13,8 +13,6 @@ using AyaNova.Biz;
|
|||||||
using AyaNova.Util;
|
using AyaNova.Util;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
using EnumsNET;
|
|
||||||
using AyaNova.DataList;
|
|
||||||
|
|
||||||
namespace AyaNova.Api.Controllers
|
namespace AyaNova.Api.Controllers
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -341,6 +341,11 @@ namespace AyaNova.Biz
|
|||||||
var log = AyaNova.Util.ApplicationLogging.CreateLogger("ReportBiz::GetReportData");
|
var log = AyaNova.Util.ApplicationLogging.CreateLogger("ReportBiz::GetReportData");
|
||||||
AuthorizationRoles effectiveRoles = CurrentUserRoles;
|
AuthorizationRoles effectiveRoles = CurrentUserRoles;
|
||||||
|
|
||||||
|
if (selectedRequest.ObjectType == AyaType.NoType)
|
||||||
|
{
|
||||||
|
AddError(ApiErrorCode.VALIDATION_REQUIRED, null, $"ObjectType is required");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
if (!AyaNova.Api.ControllerHelpers.Authorized.HasReadFullRole(effectiveRoles, selectedRequest.ObjectType))
|
if (!AyaNova.Api.ControllerHelpers.Authorized.HasReadFullRole(effectiveRoles, selectedRequest.ObjectType))
|
||||||
{
|
{
|
||||||
@@ -400,6 +405,10 @@ namespace AyaNova.Biz
|
|||||||
|
|
||||||
//Get data
|
//Get data
|
||||||
var ReportData = await GetReportData(reportRequest);
|
var ReportData = await GetReportData(reportRequest);
|
||||||
|
//if GetReportData errored then will return null so need to return that as well here
|
||||||
|
if(ReportData==null){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
//initialization
|
//initialization
|
||||||
log.LogDebug("Initializing report system");
|
log.LogDebug("Initializing report system");
|
||||||
|
|||||||
Reference in New Issue
Block a user