This commit is contained in:
2021-06-16 00:02:41 +00:00
parent dfe7d990ad
commit e47712d0d8
2 changed files with 13 additions and 6 deletions

View File

@@ -351,6 +351,7 @@ namespace AyaNova.Api.Controllers
if (u.UserType == UserType.Customer | u.UserType == UserType.HeadOffice)
{
//customer type has special rights restrictions for UI features so return them here so client UI can enable or disable
var effectiveRights = await UserBiz.CustomerUserEffectiveRights(u.Id);
return Ok(ApiOkResponse.Response(new
{
token = token,
@@ -359,7 +360,7 @@ namespace AyaNova.Api.Controllers
roles = ((int)u.Roles).ToString(),
dlt = DownloadToken,
tfa = u.TwoFactorEnabled,
CustomerRights = UserBiz.CustomerUserEffectiveRights(u.Id)
CustomerRights = effectiveRights
}));
}
else