fix Bug 62216

This commit is contained in:
pavelbannov 2023-04-21 12:27:41 +03:00
parent ff08a86942
commit edae98c73d

View File

@ -448,7 +448,7 @@ public class UserController : PeopleControllerBase
{ {
throw new SecurityException(); throw new SecurityException();
} }
_securityContext.AuthenticateMeWithoutCookie(Core.Configuration.Constants.CoreSystem); _securityContext.AuthenticateMeWithoutCookie(Core.Configuration.Constants.CoreSystem);
user.Status = EmployeeStatus.Terminated; user.Status = EmployeeStatus.Terminated;
@ -692,12 +692,11 @@ public class UserController : PeopleControllerBase
[HttpPut("invite")] [HttpPut("invite")]
public async IAsyncEnumerable<EmployeeFullDto> ResendUserInvites(UpdateMembersRequestDto inDto) public async IAsyncEnumerable<EmployeeFullDto> ResendUserInvites(UpdateMembersRequestDto inDto)
{ {
_permissionContext.DemandPermissions(new UserSecurityProvider(Guid.Empty, EmployeeType.User), Constants.Action_AddRemoveUser);
IEnumerable<UserInfo> users = null; IEnumerable<UserInfo> users = null;
if (inDto.ResendAll) if (inDto.ResendAll)
{ {
_permissionContext.DemandPermissions(new UserSecurityProvider(Guid.Empty, EmployeeType.User), Constants.Action_AddRemoveUser);
users = _userManager.GetUsers().Where(u => u.ActivationStatus == EmployeeActivationStatus.Pending); users = _userManager.GetUsers().Where(u => u.ActivationStatus == EmployeeActivationStatus.Pending);
} }
else else