From 6c2fb27eb83ffd9bd0b134137ef2f5486dfe708a Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Thu, 18 Nov 2021 20:03:45 +0000 Subject: [PATCH] --- server/AyaNova/biz/UserBiz.cs | 8 ++++++-- server/AyaNova/models/GlobalBizSettings.cs | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/server/AyaNova/biz/UserBiz.cs b/server/AyaNova/biz/UserBiz.cs index 94df4a79..cafc3e47 100644 --- a/server/AyaNova/biz/UserBiz.cs +++ b/server/AyaNova/biz/UserBiz.cs @@ -107,6 +107,7 @@ namespace AyaNova.Biz } } + //For auth and access in client, also when opening wo and also when reporting wo internal static async Task CustomerUserEffectiveRightsAsync(long userId, long? workorderId = null) { using (AyContext ct = ServiceProviderProvider.DBContext) @@ -216,7 +217,7 @@ namespace AyaNova.Biz ThisWOCanWiki = CustomerWorkOrderWikiAttachmentTags.Intersect(AyaNova.Util.ServerGlobalBizSettings.Cache.CustomerAllowWOWikiInTags).Any(); } - //WO ATTACHMENTS + //WO ATTACHMENTS if (AyaNova.Util.ServerGlobalBizSettings.Cache.CustomerAllowWOAttachments) { ThisWOCanAttachments = true; @@ -264,7 +265,10 @@ namespace AyaNova.Biz ContactCustomerHOTagsCombined, AyaNova.Util.ServerGlobalBizSettings.Cache.CustomerAllowNotifyWOCompletedInTags), EntityId, - EntityActive + EntityActive, + ThisWOEffectiveWorkOrderReportId, + ThisWOCanWiki, + ThisWOCanAttachments ); } diff --git a/server/AyaNova/models/GlobalBizSettings.cs b/server/AyaNova/models/GlobalBizSettings.cs index e455c7a1..fc23779a 100644 --- a/server/AyaNova/models/GlobalBizSettings.cs +++ b/server/AyaNova/models/GlobalBizSettings.cs @@ -127,7 +127,7 @@ namespace AyaNova.Models } //Used internally and at client end as extended rights atop roles system in relation only to Contact (customer type users) - public record CustomerRightsRecord(bool CSR, bool WO, bool WOWIKI, bool WOAttachments, bool UserSettings, bool NotifyServiceImminent, bool NotifyCSRAccepted, bool NotifyCSRRejected, bool NotifyWOCreated, bool NotifyWOCompleted, long EntityId, bool EntityActive); + public record CustomerRightsRecord(bool CSR, bool WO, bool WOWIKI, bool WOAttachments, bool UserSettings, bool NotifyServiceImminent, bool NotifyCSRAccepted, bool NotifyCSRRejected, bool NotifyWOCreated, bool NotifyWOCompleted, long EntityId, bool EntityActive, long?ThisWOEffectiveWOReportId, bool ThisWOCanWiki, bool ThisWOCanAttachments); } /* CREATE TABLE [dbo].[AGLOBAL](