ayType aytype all now AyaType or ayaType
This commit is contained in:
@@ -56,7 +56,7 @@ namespace AyaNova.Api.Controllers
|
||||
if (serverState.IsClosed)
|
||||
return StatusCode(503, new ApiErrorResponse(serverState.ApiErrorCode, null, serverState.Reason));
|
||||
|
||||
if (!Authorized.HasReadFullRole(HttpContext.Items, opt.AyType))
|
||||
if (!Authorized.HasReadFullRole(HttpContext.Items, opt.AyaType))
|
||||
{
|
||||
return StatusCode(403, new ApiNotAuthorizedResponse());
|
||||
}
|
||||
@@ -125,7 +125,7 @@ namespace AyaNova.Api.Controllers
|
||||
}
|
||||
public sealed class V7Event
|
||||
{
|
||||
public AyaType AyType { get; set; }
|
||||
public AyaType AyaType { get; set; }
|
||||
public long AyId { get; set; }
|
||||
public long Creator { get; set; }
|
||||
public long Modifier { get; set; }
|
||||
@@ -140,7 +140,7 @@ namespace AyaNova.Api.Controllers
|
||||
public sealed class EventLogOptions
|
||||
{
|
||||
[FromQuery]
|
||||
public AyaType AyType { get; set; }
|
||||
public AyaType AyaType { get; set; }
|
||||
[FromQuery]
|
||||
public long AyId { get; set; }
|
||||
[FromQuery]
|
||||
|
||||
@@ -114,6 +114,7 @@ namespace AyaNova.Api.Controllers
|
||||
if (serverState.IsClosed)
|
||||
return StatusCode(503, new ApiErrorResponse(serverState.ApiErrorCode, null, serverState.Reason));
|
||||
|
||||
//since this is for opening an entire object it's appropriate to check if they have read full role first
|
||||
if (!Authorized.HasReadFullRole(HttpContext.Items, ayaType))
|
||||
return StatusCode(403, new ApiNotAuthorizedResponse());
|
||||
|
||||
@@ -140,11 +141,8 @@ namespace AyaNova.Api.Controllers
|
||||
|
||||
}
|
||||
|
||||
// var res = await Search.GetInfoAsync(ct, UserTranslationIdFromContext.Id(HttpContext.Items),
|
||||
// UserRolesFromContext.Roles(HttpContext.Items), UserIdFromContext.Id(HttpContext.Items), phrase, max, ayaType, id);
|
||||
|
||||
return Ok(ApiOkResponse.Response(res, true));
|
||||
}
|
||||
}
|
||||
//------------
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user