People: fix, refactor
This commit is contained in:
parent
b04f50fc72
commit
1726057d95
@ -207,7 +207,7 @@ public class UserController : PeopleControllerBase
|
||||
|
||||
if (options != null && !options.IsCorrect)
|
||||
{
|
||||
throw new InvalidDataException();
|
||||
throw new SecurityException(FilesCommonResource.ErrorMessage_InvintationLink);
|
||||
}
|
||||
|
||||
var user = new UserInfo();
|
||||
@ -220,7 +220,7 @@ public class UserController : PeopleControllerBase
|
||||
|
||||
if (user == Constants.LostUser || user.ActivationStatus != EmployeeActivationStatus.Pending)
|
||||
{
|
||||
throw new InvalidOperationException();
|
||||
throw new SecurityException(FilesCommonResource.ErrorMessage_InvintationLink);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -132,7 +132,7 @@ public sealed class UserManagerWrapper
|
||||
userInfo.WorkFromDate = _tenantUtil.DateTimeNow();
|
||||
}
|
||||
|
||||
if (!_coreBaseSettings.Personal && !fromInviteLink)
|
||||
if (!_coreBaseSettings.Personal && (!fromInviteLink || updateExising))
|
||||
{
|
||||
userInfo.ActivationStatus = !afterInvite ? EmployeeActivationStatus.Pending : EmployeeActivationStatus.Activated;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user