Skip to content

Commit

Permalink
Régression : impossible de créer un utilisateur depuis la GUI WEB asi…
Browse files Browse the repository at this point in the history
  • Loading branch information
arxit-ygr committed Sep 13, 2024
1 parent 02821c3 commit 9fe680f
Showing 1 changed file with 3 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,8 @@ public final User createDomainObject(final Secrets secrets, final TwoFactorServi
}

User domainUser = new User();
domainUser.setUserType(this.getUserType());
domainUser.setTwoFactorStatus(TwoFactorStatus.INACTIVE);

return this.updateDomainObject(domainUser, secrets, twoFactorService, false, true);
}
Expand Down Expand Up @@ -524,15 +526,6 @@ public final User updateDomainObject(final User domainUser, final Secrets secret

domainUser.setMailActive(this.isMailActive());


if (this.isBeingCreated()){
// User type is set only at creation (or via the migration tool)
domainUser.setUserType(this.getUserType());

// At creation 2FA status is always inactive (but is changed later if TwoFactorForced == true)
domainUser.setTwoFactorStatus(TwoFactorStatus.INACTIVE);
}

//this.processTwoFactorChange(domainUser, isCurrentUserAdmin, encryptor, twoFactorService);
//domainUser.setTwoFactorStatus(this.getTwoFactorStatus());

Expand All @@ -548,6 +541,7 @@ public final User updateDomainObject(final User domainUser, final Secrets secret

this.logger.debug("The new forced status of the domain user is {}.", domainUser.isTwoFactorForced());


if (domainUser.getUserType() == UserType.LOCAL) {
domainUser.setEmail(this.getEmail());
domainUser.setLogin(this.getLogin());
Expand Down

0 comments on commit 9fe680f

Please sign in to comment.