This commit is contained in:
@@ -56,7 +56,7 @@ namespace AyaNova.Api.Controllers
|
|||||||
if (serverState.IsClosed)
|
if (serverState.IsClosed)
|
||||||
return StatusCode(503, new ApiErrorResponse(serverState.ApiErrorCode, null, serverState.Reason));
|
return StatusCode(503, new ApiErrorResponse(serverState.ApiErrorCode, null, serverState.Reason));
|
||||||
|
|
||||||
if (!Authorized.HasReadFullRole(HttpContext.Items, AyaType.JobOperations))
|
if (!Authorized.HasReadFullRole(HttpContext.Items, AyaType.ServerJob))
|
||||||
{
|
{
|
||||||
return StatusCode(403, new ApiNotAuthorizedResponse());
|
return StatusCode(403, new ApiNotAuthorizedResponse());
|
||||||
}
|
}
|
||||||
@@ -87,7 +87,7 @@ namespace AyaNova.Api.Controllers
|
|||||||
if (serverState.IsClosed)
|
if (serverState.IsClosed)
|
||||||
return StatusCode(503, new ApiErrorResponse(serverState.ApiErrorCode, null, serverState.Reason));
|
return StatusCode(503, new ApiErrorResponse(serverState.ApiErrorCode, null, serverState.Reason));
|
||||||
|
|
||||||
if (!Authorized.HasReadFullRole(HttpContext.Items, AyaType.JobOperations))
|
if (!Authorized.HasReadFullRole(HttpContext.Items, AyaType.ServerJob))
|
||||||
{
|
{
|
||||||
return StatusCode(403, new ApiNotAuthorizedResponse());
|
return StatusCode(403, new ApiNotAuthorizedResponse());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -303,7 +303,7 @@ namespace AyaNova.Api.Controllers
|
|||||||
if (!serverState.IsOpen)
|
if (!serverState.IsOpen)
|
||||||
return StatusCode(503, new ApiErrorResponse(serverState.ApiErrorCode, null, serverState.Reason));
|
return StatusCode(503, new ApiErrorResponse(serverState.ApiErrorCode, null, serverState.Reason));
|
||||||
|
|
||||||
if (!Authorized.HasModifyRole(HttpContext.Items, AyaType.JobOperations))
|
if (!Authorized.HasModifyRole(HttpContext.Items, AyaType.ServerJob))
|
||||||
return StatusCode(403, new ApiNotAuthorizedResponse());
|
return StatusCode(403, new ApiNotAuthorizedResponse());
|
||||||
|
|
||||||
//Create the job here
|
//Create the job here
|
||||||
|
|||||||
@@ -18,6 +18,9 @@ namespace AyaNova.Biz
|
|||||||
//CoreBizObject add here
|
//CoreBizObject add here
|
||||||
//Search for that IN SERVER AND CLIENT CODE and you will see all areas that need coding for the new object
|
//Search for that IN SERVER AND CLIENT CODE and you will see all areas that need coding for the new object
|
||||||
|
|
||||||
|
//***IMPORTANT: Also need to add translations for any new biz objects added that don't match exactly the name here in the key
|
||||||
|
//because enumlist gets it that way, i.e. "Global" would be the expected key
|
||||||
|
|
||||||
NoType = 0,
|
NoType = 0,
|
||||||
Global = 1,
|
Global = 1,
|
||||||
|
|
||||||
@@ -32,7 +35,7 @@ namespace AyaNova.Biz
|
|||||||
LogFile = 6,
|
LogFile = 6,
|
||||||
PickListTemplate = 7,
|
PickListTemplate = 7,
|
||||||
DEPRECATED_REUSELATER_8 = 8,
|
DEPRECATED_REUSELATER_8 = 8,
|
||||||
JobOperations = 9,
|
ServerJob = 9,
|
||||||
AyaNova7Import = 10,
|
AyaNova7Import = 10,
|
||||||
TrialSeeder = 11,
|
TrialSeeder = 11,
|
||||||
Metrics = 12,
|
Metrics = 12,
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ namespace AyaNova.Biz
|
|||||||
return new UserBiz(dbcontext, userId, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, roles);
|
return new UserBiz(dbcontext, userId, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, roles);
|
||||||
case AyaType.Widget:
|
case AyaType.Widget:
|
||||||
return new WidgetBiz(dbcontext, userId, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, roles);
|
return new WidgetBiz(dbcontext, userId, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, roles);
|
||||||
case AyaType.JobOperations:
|
case AyaType.ServerJob:
|
||||||
return new JobOperationsBiz(dbcontext, userId, roles);
|
return new JobOperationsBiz(dbcontext, userId, roles);
|
||||||
case AyaType.AyaNova7Import:
|
case AyaType.AyaNova7Import:
|
||||||
return new ImportAyaNova7Biz(dbcontext, userId, roles);
|
return new ImportAyaNova7Biz(dbcontext, userId, roles);
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ namespace AyaNova.Biz
|
|||||||
//OPERATIONS / JOBS
|
//OPERATIONS / JOBS
|
||||||
//Only opsfull can change operations
|
//Only opsfull can change operations
|
||||||
//ops and biz admin can view operations
|
//ops and biz admin can view operations
|
||||||
roles.Add(AyaType.JobOperations, new BizRoleSet()
|
roles.Add(AyaType.ServerJob, new BizRoleSet()
|
||||||
{
|
{
|
||||||
Change = AuthorizationRoles.OpsAdminFull,
|
Change = AuthorizationRoles.OpsAdminFull,
|
||||||
ReadFullRecord = AuthorizationRoles.OpsAdminLimited | AuthorizationRoles.BizAdminFull | AuthorizationRoles.BizAdminLimited
|
ReadFullRecord = AuthorizationRoles.OpsAdminLimited | AuthorizationRoles.BizAdminFull | AuthorizationRoles.BizAdminLimited
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ namespace AyaNova.Biz
|
|||||||
ct = dbcontext;
|
ct = dbcontext;
|
||||||
UserId = currentUserId;
|
UserId = currentUserId;
|
||||||
CurrentUserRoles = userRoles;
|
CurrentUserRoles = userRoles;
|
||||||
BizType=AyaType.JobOperations;
|
BizType=AyaType.ServerJob;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -701,7 +701,7 @@ namespace AyaNova.Biz
|
|||||||
{
|
{
|
||||||
|
|
||||||
#if (DEBUG)
|
#if (DEBUG)
|
||||||
if (p.ObjectType == AyaType.JobOperations || p.ObjectType == AyaType.Translation)
|
if (p.ObjectType == AyaType.ServerJob || p.ObjectType == AyaType.Translation)
|
||||||
{
|
{
|
||||||
throw new System.NotSupportedException($"Search::ProcessKeywords - Invalid type presented {p.ObjectType}");
|
throw new System.NotSupportedException($"Search::ProcessKeywords - Invalid type presented {p.ObjectType}");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1650,6 +1650,13 @@
|
|||||||
"EventLicenseFetch":"License retrieved",
|
"EventLicenseFetch":"License retrieved",
|
||||||
"EventLicenseTrialRequest":"Trial license requested",
|
"EventLicenseTrialRequest":"Trial license requested",
|
||||||
"EventServerStateChange":"Server state changed",
|
"EventServerStateChange":"Server state changed",
|
||||||
"EventSeedDatabase":"Database seeded with trial data"
|
"EventSeedDatabase":"Database seeded with trial data",
|
||||||
|
"NoType":"No type",
|
||||||
|
"License":"License",
|
||||||
|
"LogFile":"Log file",
|
||||||
|
"PickListTemplate":"Select list template",
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user