use of org.apache.isis.applib.value.Password in project estatio by estatio.
the class ApplicationUserBuilder method execute.
@Override
protected void execute(ExecutionContext executionContext) {
checkParam("person", executionContext, Person.class);
checkParam("securityUsername", executionContext, String.class);
defaultParam("securityUserAccountCloneFrom", executionContext, "estatio-admin");
if (securityUsername != null) {
ApplicationUser userToCloneFrom = applicationUserRepository.findByUsername(securityUserAccountCloneFrom);
if (userToCloneFrom == null) {
throw new IllegalArgumentException("Could not find any user with username: " + securityUserAccountCloneFrom);
}
object = applicationUserRepository.newLocalUserBasedOn(securityUsername, new Password("pass"), new Password("pass"), userToCloneFrom, true, null);
object.setAtPath(person.getAtPath());
person.setUsername(securityUsername);
executionContext.addResult(this, securityUsername, userToCloneFrom);
}
}
Aggregations