diff --git a/server/AyaNova/Controllers/JobOperationsController.cs b/server/AyaNova/Controllers/JobOperationsController.cs index 35a82455..87a72563 100644 --- a/server/AyaNova/Controllers/JobOperationsController.cs +++ b/server/AyaNova/Controllers/JobOperationsController.cs @@ -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, AyaType.JobOperations)) + if (!Authorized.HasReadFullRole(HttpContext.Items, AyaType.ServerJob)) { return StatusCode(403, new ApiNotAuthorizedResponse()); } @@ -87,7 +87,7 @@ namespace AyaNova.Api.Controllers if (serverState.IsClosed) 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()); } diff --git a/server/AyaNova/Controllers/WidgetController.cs b/server/AyaNova/Controllers/WidgetController.cs index 09eb09b8..195d6f53 100644 --- a/server/AyaNova/Controllers/WidgetController.cs +++ b/server/AyaNova/Controllers/WidgetController.cs @@ -303,7 +303,7 @@ namespace AyaNova.Api.Controllers if (!serverState.IsOpen) 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()); //Create the job here diff --git a/server/AyaNova/biz/AyaType.cs b/server/AyaNova/biz/AyaType.cs index f93906e9..7704fb89 100644 --- a/server/AyaNova/biz/AyaType.cs +++ b/server/AyaNova/biz/AyaType.cs @@ -18,6 +18,9 @@ namespace AyaNova.Biz //CoreBizObject add here //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, Global = 1, @@ -32,7 +35,7 @@ namespace AyaNova.Biz LogFile = 6, PickListTemplate = 7, DEPRECATED_REUSELATER_8 = 8, - JobOperations = 9, + ServerJob = 9, AyaNova7Import = 10, TrialSeeder = 11, Metrics = 12, diff --git a/server/AyaNova/biz/BizObjectFactory.cs b/server/AyaNova/biz/BizObjectFactory.cs index 54b7c5ec..f912e33b 100644 --- a/server/AyaNova/biz/BizObjectFactory.cs +++ b/server/AyaNova/biz/BizObjectFactory.cs @@ -28,7 +28,7 @@ namespace AyaNova.Biz return new UserBiz(dbcontext, userId, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, roles); case AyaType.Widget: return new WidgetBiz(dbcontext, userId, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, roles); - case AyaType.JobOperations: + case AyaType.ServerJob: return new JobOperationsBiz(dbcontext, userId, roles); case AyaType.AyaNova7Import: return new ImportAyaNova7Biz(dbcontext, userId, roles); diff --git a/server/AyaNova/biz/BizRoles.cs b/server/AyaNova/biz/BizRoles.cs index 52131d46..6f303cdd 100644 --- a/server/AyaNova/biz/BizRoles.cs +++ b/server/AyaNova/biz/BizRoles.cs @@ -109,7 +109,7 @@ namespace AyaNova.Biz //OPERATIONS / JOBS //Only opsfull can change operations //ops and biz admin can view operations - roles.Add(AyaType.JobOperations, new BizRoleSet() + roles.Add(AyaType.ServerJob, new BizRoleSet() { Change = AuthorizationRoles.OpsAdminFull, ReadFullRecord = AuthorizationRoles.OpsAdminLimited | AuthorizationRoles.BizAdminFull | AuthorizationRoles.BizAdminLimited diff --git a/server/AyaNova/biz/JobOperationsBiz.cs b/server/AyaNova/biz/JobOperationsBiz.cs index 8d3dc1f8..30417d65 100644 --- a/server/AyaNova/biz/JobOperationsBiz.cs +++ b/server/AyaNova/biz/JobOperationsBiz.cs @@ -24,7 +24,7 @@ namespace AyaNova.Biz ct = dbcontext; UserId = currentUserId; CurrentUserRoles = userRoles; - BizType=AyaType.JobOperations; + BizType=AyaType.ServerJob; } diff --git a/server/AyaNova/biz/Search.cs b/server/AyaNova/biz/Search.cs index 0e41f316..26528e81 100644 --- a/server/AyaNova/biz/Search.cs +++ b/server/AyaNova/biz/Search.cs @@ -701,7 +701,7 @@ namespace AyaNova.Biz { #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}"); } diff --git a/server/AyaNova/resource/en.json b/server/AyaNova/resource/en.json index 4ef3e513..1acb7cb1 100644 --- a/server/AyaNova/resource/en.json +++ b/server/AyaNova/resource/en.json @@ -1650,6 +1650,13 @@ "EventLicenseFetch":"License retrieved", "EventLicenseTrialRequest":"Trial license requested", "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", + + + }