This commit is contained in:
2022-08-23 14:59:58 +00:00
parent a9b7cafc1d
commit f8f0aeba4c
4 changed files with 76 additions and 25 deletions

View File

@@ -93,8 +93,8 @@ namespace AyaNova.Biz
//Also used for Contacts (customer type user or ho type user)
//by users with no User right but with Customer rights so need to double check here
if (
(u.IsOutsideUser && !Authorized.HasModifyRole(CurrentUserRoles, AyaType.Customer)) ||
(!u.IsOutsideUser && !Authorized.HasModifyRole(CurrentUserRoles, AyaType.User))
(u.IsOutsideCustomerContactTypeUser && !Authorized.HasModifyRole(CurrentUserRoles, AyaType.Customer)) ||
(!u.IsOutsideCustomerContactTypeUser && !Authorized.HasModifyRole(CurrentUserRoles, AyaType.User))
)
{
AddError(ApiErrorCode.NOT_AUTHORIZED);