This commit is contained in:
@@ -70,10 +70,11 @@ namespace AyaNova.Api.Controllers
|
||||
return BadRequest(new ApiErrorResponse(ModelState));
|
||||
|
||||
var UserRoles = UserRolesFromContext.Roles(HttpContext.Items);
|
||||
var UserId = UserIdFromContext.Id(HttpContext.Items);
|
||||
|
||||
try
|
||||
{
|
||||
ApiDataListResponse r = await DataListFetcher.GetResponseAsync(listOptions.DataListKey, ct, listOptions, UserRoles, log);
|
||||
ApiDataListResponse r = await DataListFetcher.GetResponseAsync(listOptions.DataListKey, ct, listOptions, UserRoles, log, UserId);
|
||||
return Ok(r);
|
||||
}
|
||||
catch (System.UnauthorizedAccessException)
|
||||
|
||||
@@ -70,7 +70,7 @@ namespace AyaNova.Api.Controllers
|
||||
if (format != "csv" && format != "json")
|
||||
return BadRequest(new ApiErrorResponse(ApiErrorCode.VALIDATION_INVALID_VALUE, null, "format not valid, must be 'csv' or 'json'"));
|
||||
|
||||
await dataListSelection.RehydrateIdList(ct, UserRolesFromContext.Roles(HttpContext.Items), log);
|
||||
await dataListSelection.RehydrateIdList(ct, UserRolesFromContext.Roles(HttpContext.Items), log, UserIdFromContext.Id(HttpContext.Items));
|
||||
if (dataListSelection.SelectedRowIds.Length == 0)
|
||||
return BadRequest(new ApiErrorResponse(ApiErrorCode.VALIDATION_REQUIRED, null, "List of ids"));
|
||||
|
||||
|
||||
@@ -211,7 +211,7 @@ namespace AyaNova.Api.Controllers
|
||||
return StatusCode(403, new ApiNotAuthorizedResponse());
|
||||
|
||||
|
||||
await dataListSelection.RehydrateIdList(ct, UserRolesFromContext.Roles(HttpContext.Items), log);
|
||||
await dataListSelection.RehydrateIdList(ct, UserRolesFromContext.Roles(HttpContext.Items), log, UserIdFromContext.Id(HttpContext.Items));
|
||||
if (dataListSelection.SelectedRowIds.Length == 0)
|
||||
return BadRequest(new ApiErrorResponse(ApiErrorCode.VALIDATION_REQUIRED, null, "List of ids"));
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@ namespace AyaNova.Api.Controllers
|
||||
if (string.IsNullOrWhiteSpace(tag))
|
||||
return BadRequest(new ApiErrorResponse(ApiErrorCode.VALIDATION_REQUIRED, null, "tag required"));
|
||||
|
||||
await dataListSelection.RehydrateIdList(ct, UserRolesFromContext.Roles(HttpContext.Items), log);
|
||||
await dataListSelection.RehydrateIdList(ct, UserRolesFromContext.Roles(HttpContext.Items), log, UserIdFromContext.Id(HttpContext.Items));
|
||||
if (dataListSelection.SelectedRowIds.Length == 0)
|
||||
return BadRequest(new ApiErrorResponse(ApiErrorCode.VALIDATION_REQUIRED, null, "List of ids"));
|
||||
|
||||
@@ -192,7 +192,7 @@ namespace AyaNova.Api.Controllers
|
||||
if (string.IsNullOrWhiteSpace(tag))
|
||||
return BadRequest(new ApiErrorResponse(ApiErrorCode.VALIDATION_REQUIRED, null, "tag"));
|
||||
|
||||
await dataListSelection.RehydrateIdList(ct, UserRolesFromContext.Roles(HttpContext.Items), log);
|
||||
await dataListSelection.RehydrateIdList(ct, UserRolesFromContext.Roles(HttpContext.Items), log, UserIdFromContext.Id(HttpContext.Items));
|
||||
if (dataListSelection.SelectedRowIds.Length == 0)
|
||||
return BadRequest(new ApiErrorResponse(ApiErrorCode.VALIDATION_REQUIRED, null, "List of ids"));
|
||||
|
||||
@@ -284,7 +284,7 @@ namespace AyaNova.Api.Controllers
|
||||
toTag = TagBiz.NormalizeTag(toTag);
|
||||
if (string.IsNullOrWhiteSpace(toTag))
|
||||
return BadRequest(new ApiErrorResponse(ApiErrorCode.VALIDATION_REQUIRED, null, "toTag"));
|
||||
await dataListSelection.RehydrateIdList(ct, UserRolesFromContext.Roles(HttpContext.Items), log);
|
||||
await dataListSelection.RehydrateIdList(ct, UserRolesFromContext.Roles(HttpContext.Items), log, UserIdFromContext.Id(HttpContext.Items));
|
||||
if (dataListSelection.SelectedRowIds.Length == 0)
|
||||
return BadRequest(new ApiErrorResponse(ApiErrorCode.VALIDATION_REQUIRED, null, "List of ids"));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user