This commit is contained in:
@@ -346,7 +346,7 @@ namespace AyaNova.Biz
|
|||||||
//REPORT DATA
|
//REPORT DATA
|
||||||
//Data fetched to return to report designer for Client report design usage
|
//Data fetched to return to report designer for Client report design usage
|
||||||
|
|
||||||
public async Task<Newtonsoft.Json.Linq.JArray> GetReportData(DataListSelectedRequest selectedRequest)
|
public async Task<Newtonsoft.Json.Linq.JArray> GetReportData(DataListSelectedRequest selectedRequest, bool requestIsCustomerWorkOrderReport = false)
|
||||||
{
|
{
|
||||||
var log = AyaNova.Util.ApplicationLogging.CreateLogger("ReportBiz::GetReportData");
|
var log = AyaNova.Util.ApplicationLogging.CreateLogger("ReportBiz::GetReportData");
|
||||||
AuthorizationRoles effectiveRoles = CurrentUserRoles;
|
AuthorizationRoles effectiveRoles = CurrentUserRoles;
|
||||||
@@ -357,7 +357,7 @@ namespace AyaNova.Biz
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!AyaNova.Api.ControllerHelpers.Authorized.HasReadFullRole(effectiveRoles, selectedRequest.AType))
|
if (!requestIsCustomerWorkOrderReport && !AyaNova.Api.ControllerHelpers.Authorized.HasReadFullRole(effectiveRoles, selectedRequest.AType))
|
||||||
{
|
{
|
||||||
AddError(ApiErrorCode.NOT_AUTHORIZED, null, $"User not authorized for {selectedRequest.AType} type object");
|
AddError(ApiErrorCode.NOT_AUTHORIZED, null, $"User not authorized for {selectedRequest.AType} type object");
|
||||||
return null;
|
return null;
|
||||||
@@ -436,7 +436,7 @@ namespace AyaNova.Biz
|
|||||||
reportRequest.IncludeWoItemDescendants = report.IncludeWoItemDescendants;
|
reportRequest.IncludeWoItemDescendants = report.IncludeWoItemDescendants;
|
||||||
|
|
||||||
//Get data
|
//Get data
|
||||||
var ReportData = await GetReportData(reportRequest);//###### TODO: SLOW NEEDS TIMEOUT HERE ONCE IT WORKS IS SUPPORTED
|
var ReportData = await GetReportData(reportRequest, RequestIsCustomerWorkOrderReport);//###### TODO: SLOW NEEDS TIMEOUT HERE ONCE IT WORKS IS SUPPORTED
|
||||||
//if GetReportData errored then will return null so need to return that as well here
|
//if GetReportData errored then will return null so need to return that as well here
|
||||||
if (ReportData == null)
|
if (ReportData == null)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user