This commit is contained in:
2021-11-18 20:03:45 +00:00
parent c5d5dea7e8
commit 6c2fb27eb8
2 changed files with 7 additions and 3 deletions

View File

@@ -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<CustomerRightsRecord> 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
);
}

View File

@@ -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](