This commit is contained in:
2021-07-13 17:55:36 +00:00
parent 7d5b49c950
commit b1880ecf04
6 changed files with 40 additions and 11 deletions

View File

@@ -12,7 +12,11 @@ namespace AyaNova.Biz
//Returns the biz object class that corresponds to the type presented
//Used by SEARCH, REPORTING and objects with JOBS
internal static BizObject GetBizObject(AyaType ayaType, AyContext ct, long userId = 1, AuthorizationRoles roles = AuthorizationRoles.All, long translationId = 0)
internal static BizObject GetBizObject(AyaType ayaType,
AyContext ct,
long userId = 1,
AuthorizationRoles roles = AuthorizationRoles.All,
long translationId = 0)
{
if (translationId == 0)
translationId = ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID;
@@ -92,7 +96,7 @@ namespace AyaNova.Biz
case AyaType.WorkOrderItemTravel:
case AyaType.WorkOrderItemUnit:
case AyaType.WorkOrderItemOutsideService:
return new WorkOrderBiz(ct, userId, translationId, roles);
return new WorkOrderBiz(ct, userId, translationId, roles, UserType.NotService);//default to not service for now arbitrarily on the principle of least access
//---
case AyaType.WorkOrderTemplate:
return new WorkOrderTemplateBiz(ct, userId, translationId, roles);