This commit is contained in:
2021-09-08 23:33:01 +00:00
parent 42cfd91bdb
commit 220f185418
5 changed files with 27 additions and 3 deletions

View File

@@ -15,7 +15,7 @@ namespace AyaNova.Biz
internal class PickListBiz : BizObject
{
internal PickListBiz(AyContext dbcontext, long currentUserId, long userTranslationId, AuthorizationRoles UserRoles)
{
ct = dbcontext;

View File

@@ -132,6 +132,10 @@ namespace AyaNova.Biz
if (UserInfo.HeadOfficeId != null && UserInfo.HeadOfficeId != 0)
AllTags.AddRange(await ct.HeadOffice.AsNoTracking().Where(x => x.Id == UserInfo.HeadOfficeId).Select(x => x.Tags).FirstAsync());
long EntityId=0;
if(UserInfo.UserType==UserType.Customer) EntityId=UserInfo.CustomerId??0;
if(UserInfo.UserType==UserType.HeadOffice) EntityId=UserInfo.HeadOfficeId??0;
return new CustomerRightsRecord(
CustomerUserEffectiveRightsAllowed(AyaNova.Util.ServerGlobalBizSettings.Cache.CustomerAllowCSR,
@@ -177,7 +181,8 @@ namespace AyaNova.Biz
CustomerUserEffectiveRightsAllowed(AyaNova.Util.ServerGlobalBizSettings.Cache.CustomerAllowNotifyWOCompleted,
AllTags,
AyaNova.Util.ServerGlobalBizSettings.Cache.CustomerAllowNotifyWOCompletedInTags,
AyaNova.Util.ServerGlobalBizSettings.Cache.CustomerAllowNotifyWOCompletedOutTags)
AyaNova.Util.ServerGlobalBizSettings.Cache.CustomerAllowNotifyWOCompletedOutTags),
EntityId
);
}