diff --git a/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/InitialAdminInitializer.java b/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/InitialAdminInitializer.java index 3fd6dfe2e1..682f3531dc 100644 --- a/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/InitialAdminInitializer.java +++ b/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/InitialAdminInitializer.java @@ -24,7 +24,7 @@ public class InitialAdminInitializer { @Value("${sechub.initialadmin.email}") @MustBeDocumented(value = "Mail of initial administrator") - String initialAdminEmailAdress; + String initialAdminEmailAddress; @Value("${sechub.initialadmin.apitoken:}") // : so default is empty, making this optional. @MustBeDocumented(value = "An apitoken for initial admin, will only be used in DEV and INTEGRATIONTEST profiles and is optional!") @@ -44,7 +44,7 @@ public CommandLineRunner initialIntegrationTestAdmin(InternalInitialDataService * production data and also run only on a non productive system, so in this case * the usage is okay, because automated integration tests run much faster. */ - internalService.createInitialAdmin(initialAdminUserid, initialAdminEmailAdress, "{noop}" + initialAdminApiToken); + internalService.createInitialAdmin(initialAdminUserid, initialAdminEmailAddress, "{noop}" + initialAdminApiToken); /* * an additional test user, has no rights initial. Only for integration tests, * so password here plain and not configurable @@ -58,7 +58,7 @@ public CommandLineRunner initialIntegrationTestAdmin(InternalInitialDataService @Profile({ Profiles.INITIAL_ADMIN_PREDEFINED }) // used in DEV profile public CommandLineRunner initialSecHubAdmDevelopmentOnly(InternalInitialDataService internalService) { return args -> { - internalService.createInitialAdmin(initialAdminUserid, initialAdminEmailAdress, initialAdminApiToken); + internalService.createInitialAdmin(initialAdminUserid, initialAdminEmailAddress, initialAdminApiToken); }; } @@ -67,7 +67,7 @@ public CommandLineRunner initialSecHubAdmDevelopmentOnly(InternalInitialDataServ @Profile({ Profiles.INITIAL_ADMIN_CREATED }) // used inside PROD profile public CommandLineRunner initialSecHubAdm(InternalInitialDataService internalService) { return args -> { - internalService.createInitialAdmin(initialAdminUserid, initialAdminEmailAdress, UUID.randomUUID().toString()); // uses SecureRandom + internalService.createInitialAdmin(initialAdminUserid, initialAdminEmailAddress, UUID.randomUUID().toString()); // uses SecureRandom }; } diff --git a/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/job/JobCancelService.java b/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/job/JobCancelService.java index 6fcd7b7d27..841581a2b0 100644 --- a/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/job/JobCancelService.java +++ b/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/job/JobCancelService.java @@ -79,7 +79,7 @@ private JobMessage buildMessage(UUID jobUUID) { return message; } message.setOwner(jobInfo.owner); - message.setOwnerEmailAddress(optUser.get().getEmailAdress()); + message.setOwnerEmailAddress(optUser.get().getEmailAddress()); return message; } diff --git a/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/job/JobInformation.java b/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/job/JobInformation.java index 1a916fca83..7145c732da 100644 --- a/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/job/JobInformation.java +++ b/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/job/JobInformation.java @@ -27,7 +27,7 @@ public class JobInformation { /* +-----------------------------------------------------------------------+ */ public static final String TABLE_NAME = "ADM_JOB_INFORMATION"; /** - * Email adress is also the primary key. So no duplicates + * Email address is also the primary key. So no duplicates */ public static final String COLUMN_UUID = "UUID"; public static final String COLUMN_JOB_UUID = "JOB_UUID"; diff --git a/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/job/JobRestartRequestService.java b/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/job/JobRestartRequestService.java index 3b385dee8c..f33ef36bb5 100644 --- a/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/job/JobRestartRequestService.java +++ b/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/job/JobRestartRequestService.java @@ -97,7 +97,7 @@ private JobMessage buildMessage(UUID jobUUID) { return message; } message.setOwner(jobInfo.owner); - message.setOwnerEmailAddress(optUser.get().getEmailAdress()); + message.setOwnerEmailAddress(optUser.get().getEmailAddress()); return message; } diff --git a/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/project/ProjectChangeOwnerService.java b/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/project/ProjectChangeOwnerService.java index eb59080094..8991f0466e 100644 --- a/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/project/ProjectChangeOwnerService.java +++ b/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/project/ProjectChangeOwnerService.java @@ -102,11 +102,11 @@ private void sendOwnerChangedForProjectEvent(Project project, User previousOwner DomainMessage request = new DomainMessage(MessageID.PROJECT_OWNER_CHANGED); ProjectMessage projectData = new ProjectMessage(); projectData.setProjectId(project.id); - projectData.setPreviousProjectOwnerEmailAddress(previousOwner.getEmailAdress()); - projectData.setProjectOwnerEmailAddress(newOwner.getEmailAdress()); + projectData.setPreviousProjectOwnerEmailAddress(previousOwner.getEmailAddress()); + projectData.setProjectOwnerEmailAddress(newOwner.getEmailAddress()); project.users.forEach(user -> { - projectData.addUserEmailAddress(user.getEmailAdress()); + projectData.addUserEmailAddress(user.getEmailAddress()); }); request.set(MessageDataKeys.PROJECT_OWNER_CHANGE_DATA, projectData); diff --git a/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/project/ProjectDeleteService.java b/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/project/ProjectDeleteService.java index 1e6bbd5820..019c0afa45 100644 --- a/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/project/ProjectDeleteService.java +++ b/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/project/ProjectDeleteService.java @@ -73,12 +73,12 @@ public void deleteProject(String projectId) { if (owner == null) { LOG.warn("No owner found for project {} while deleting", project.getId()); } else { - message.setProjectOwnerEmailAddress(owner.getEmailAdress()); + message.setProjectOwnerEmailAddress(owner.getEmailAddress()); owner.getOwnedProjects().remove(project); // handle ORM mapping. Avoid cache conflicts } for (User user : project.getUsers()) { - message.addUserEmailAddress(user.getEmailAdress()); + message.addUserEmailAddress(user.getEmailAddress()); user.getProjects().remove(project); // handle ORM mapping. Avoid cache conflicts } diff --git a/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/signup/AnonymousSignupCreateService.java b/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/signup/AnonymousSignupCreateService.java index e89d1806e8..b6458ca161 100644 --- a/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/signup/AnonymousSignupCreateService.java +++ b/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/signup/AnonymousSignupCreateService.java @@ -54,23 +54,23 @@ public class AnonymousSignupCreateService { @UseCaseUserSignup(@Step(number = 2, name = "Persistence", description = "Valid self registration input will be persisted to database.")) public void register(@Valid SignupJsonInput userSelfRegistrationInput) { String userId = userSelfRegistrationInput.getUserId(); - String emailAdress = userSelfRegistrationInput.getEmailAdress(); + String emailAddress = userSelfRegistrationInput.getEmailAddress(); - LOG.debug("user tries to register himself:{},mail:{}", userId, emailAdress); + LOG.debug("user tries to register himself:{},mail:{}", userId, emailAddress); assertion.assertIsValidUserId(userId); - assertion.assertIsValidEmailAddress(emailAdress); + assertion.assertIsValidEmailAddress(emailAddress); - assertNotAlreadySignedIn(userId, emailAdress); - assertUsernameNotUsedAlready(userId, emailAdress); - assertEmailAdressNotUsedAlready(userId, emailAdress); + assertNotAlreadySignedIn(userId, emailAddress); + assertUsernameNotUsedAlready(userId, emailAddress); + assertEmailAddressNotUsedAlready(userId, emailAddress); Signup entity = new Signup(); - entity.setEmailAdress(emailAdress); + entity.setEmailAddress(emailAddress); entity.setUserId(userId); userSelfRegistrationRepository.save(entity); - LOG.debug("Added registration entry for user:{},mail:{}", entity.getUserId(), entity.getEmailAdress()); + LOG.debug("Added registration entry for user:{},mail:{}", entity.getUserId(), entity.getEmailAddress()); /* trigger event */ informAboutSignupRequest(entity); @@ -81,7 +81,7 @@ private void informAboutSignupRequest(Signup signup) { DomainMessage infoRequest = new DomainMessage(MessageID.USER_SIGNUP_REQUESTED); UserMessage userMessage = new UserMessage(); - userMessage.setEmailAdress(signup.getEmailAdress()); + userMessage.setEmailAddress(signup.getEmailAddress()); userMessage.setUserId(signup.getUserId()); infoRequest.set(MessageDataKeys.USER_SIGNUP_DATA, userMessage); @@ -89,29 +89,29 @@ private void informAboutSignupRequest(Signup signup) { eventBusService.sendAsynchron(infoRequest); } - private void assertEmailAdressNotUsedAlready(String userId, String emailAdress) { - Optional foundUserByMail = userRepository.findByEmailAdress(emailAdress); + private void assertEmailAddressNotUsedAlready(String userId, String emailAddress) { + Optional foundUserByMail = userRepository.findByEmailAddress(emailAddress); if (foundUserByMail.isPresent()) { - LOG.warn("Self registration coming in for emailadress:{} and user:{} but an existing user does already have this email adress. So not accepted", - emailAdress, userId); + LOG.warn("Self registration coming in for email address:{} and user:{} but an existing user does already have this email address. So not accepted", + emailAddress, userId); handleRegistrationNotPossible(); } } - private void assertUsernameNotUsedAlready(String userId, String emailAdress) { + private void assertUsernameNotUsedAlready(String userId, String emailAddress) { Optional foundUser = userRepository.findById(userId); if (foundUser.isPresent()) { - LOG.warn("Self registration coming in for emailadress:{} and user:{} but existing user found by name. So not accepted", emailAdress, userId); + LOG.warn("Self registration coming in for email address:{} and user:{} but existing user found by name. So not accepted", emailAddress, userId); handleRegistrationNotPossible(); } } - private void assertNotAlreadySignedIn(String userId, String emailAdress) { + private void assertNotAlreadySignedIn(String userId, String emailAddress) { Optional found = userSelfRegistrationRepository.findById(userId); if (found.isPresent()) { - LOG.warn("Self registration coming in for emailadress:{} and user:{} but signup already exists. So not accepted", emailAdress, userId); + LOG.warn("Self registration coming in for email address:{} and user:{} but signup already exists. So not accepted", emailAddress, userId); handleRegistrationNotPossible(); } } diff --git a/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/signup/Signup.java b/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/signup/Signup.java index 1ae5683dd4..031b8359ae 100644 --- a/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/signup/Signup.java +++ b/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/signup/Signup.java @@ -19,9 +19,9 @@ public class Signup { public static final String TABLE_NAME = "ADM_USER_SELFREGISTRATION"; /** - * Email adress is also the primary key. So no duplicates + * Email address is also the primary key. So no duplicates */ - public static final String COLUMN_EMAIL_ADRESS = "EMAIL_ADRESS"; + public static final String COLUMN_EMAIL_ADDRESS = "EMAIL_ADDRESS"; public static final String COLUMN_USER_ID = "USER_ID"; /* +-----------------------------------------------------------------------+ */ @@ -33,23 +33,23 @@ public class Signup { @Column(name = COLUMN_USER_ID) String userId; - @Column(name = COLUMN_EMAIL_ADRESS, nullable = false) - String emailAdress; + @Column(name = COLUMN_EMAIL_ADDRESS, nullable = false) + String emailAddress; @Version @Column(name = "VERSION") Integer version; - public void setEmailAdress(String emailAdress) { - this.emailAdress = emailAdress; + public void setEmailAddress(String emailAddress) { + this.emailAddress = emailAddress; } public void setUserId(String userId) { this.userId = userId; } - public String getEmailAdress() { - return emailAdress; + public String getEmailAddress() { + return emailAddress; } public String getUserId() { diff --git a/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/signup/SignupJsonInput.java b/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/signup/SignupJsonInput.java index c840cd8668..632deabf26 100644 --- a/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/signup/SignupJsonInput.java +++ b/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/signup/SignupJsonInput.java @@ -11,11 +11,11 @@ public class SignupJsonInput implements JSONable { public static final String PROPERTY_API_VERSION = "apiVersion"; public static final String PROPERTY_USER_ID = "userId"; - public static final String PROPERTY_EMAIL_ADRESS = "emailAdress"; + public static final String PROPERTY_EMAIL_ADDRESS = "emailAddress"; private String apiVersion; private String userId; - private String emailAdress; + private String emailAddress; @Override public Class getJSONTargetClass() { @@ -38,12 +38,12 @@ public void setUserId(String userId) { this.userId = userId; } - public String getEmailAdress() { - return emailAdress; + public String getEmailAddress() { + return emailAddress; } - public void setEmailAdress(String emailAdress) { - this.emailAdress = emailAdress; + public void setEmailAddress(String emailAddress) { + this.emailAddress = emailAddress; } } diff --git a/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/signup/SignupJsonInputValidator.java b/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/signup/SignupJsonInputValidator.java index 7d73dd9201..54399062c5 100644 --- a/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/signup/SignupJsonInputValidator.java +++ b/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/signup/SignupJsonInputValidator.java @@ -62,9 +62,9 @@ public void validate(Object target, Errors errors) { return; } - ValidationResult emailValidationResult = emailValidation.validate(selfRegistration.getEmailAdress()); + ValidationResult emailValidationResult = emailValidation.validate(selfRegistration.getEmailAddress()); if (!emailValidationResult.isValid()) { - errors.rejectValue(PROPERTY_EMAIL_ADRESS, "api.error.email.invalid", "Invalid email adress"); + errors.rejectValue(PROPERTY_EMAIL_ADDRESS, "api.error.email.invalid", "Invalid email address"); return; } LOG.debug("Selfregistration of {} was accepted", selfRegistration.getUserId()); diff --git a/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/user/AnonymousUserGetAPITokenByOneTimeTokenService.java b/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/user/AnonymousUserGetAPITokenByOneTimeTokenService.java index 624b576111..801981257f 100644 --- a/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/user/AnonymousUserGetAPITokenByOneTimeTokenService.java +++ b/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/user/AnonymousUserGetAPITokenByOneTimeTokenService.java @@ -103,7 +103,7 @@ public String createNewAPITokenForUserByOneTimeToken(String oneTimeToken) { private void sendUserAPITokenChanged(User user) { DomainMessage request = new DomainMessage(MessageID.USER_API_TOKEN_CHANGED); UserMessage message = new UserMessage(); - message.setEmailAdress(user.getEmailAdress()); + message.setEmailAddress(user.getEmailAddress()); message.setUserId(user.getName()); message.setHashedApiToken(user.getHashedApiToken()); diff --git a/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/user/AnonymousUserRequestNewApiTokenRestController.java b/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/user/AnonymousUserRequestNewApiTokenRestController.java index d1847996a4..0522f1f264 100644 --- a/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/user/AnonymousUserRequestNewApiTokenRestController.java +++ b/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/user/AnonymousUserRequestNewApiTokenRestController.java @@ -30,9 +30,9 @@ public class AnonymousUserRequestNewApiTokenRestController { @CrossOrigin /* to allow call from getsechub.detss and maybe other sites using javascript */ @UseCaseUserRequestsNewApiToken(@Step(number=1, name="Rest API call",description="Rest api called to request new user api token. Normally done by user itself",needsRestDoc=true)) @RequestMapping(path = AdministrationAPIConstants.API_REQUEST_NEW_APITOKEN, method = RequestMethod.POST) - public void anonymousRequestToGetNewApiTokenForUserMailAdress(@PathVariable(name="emailAddress") String emailAdress) { + public void anonymousRequestToGetNewApiTokenForUserEmailAddress(@PathVariable(name="emailAddress") String emailAddress) { /* @formatter:on */ - newApiTokenService.anonymousRequestToGetNewApiTokenForUserMailAdress(emailAdress); + newApiTokenService.anonymousRequestToGetNewApiTokenForUserEmailAddress(emailAddress); } } diff --git a/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/user/AnonymousUserRequestsNewApiTokenService.java b/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/user/AnonymousUserRequestsNewApiTokenService.java index 8b20499210..61924c2110 100644 --- a/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/user/AnonymousUserRequestsNewApiTokenService.java +++ b/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/user/AnonymousUserRequestsNewApiTokenService.java @@ -44,12 +44,12 @@ public class AnonymousUserRequestsNewApiTokenService { @Autowired UserInputAssertion assertion; - public void anonymousRequestToGetNewApiTokenForUserMailAdress(String userEmail) { + public void anonymousRequestToGetNewApiTokenForUserEmailAddress(String userEmail) { LOG.info("New api token requested for email address: {})", logSanitizer.sanitize(userEmail, 50)); assertion.assertIsValidEmailAddress(userEmail); - Optional found = userRepository.findByEmailAdress(userEmail); + Optional found = userRepository.findByEmailAddress(userEmail); if (!found.isPresent()) { /* we just do nothing here - prevent user enumeration by hacking... */ LOG.warn("Anonymous request to get new api token, but user unknown: {})", logSanitizer.sanitize(userEmail, 50)); @@ -66,7 +66,7 @@ private void sendUserNewApiTokenRequested(String userEmail, User user) { /* we just send info about new api token */ DomainMessage infoRequest = new DomainMessage(MessageID.USER_NEW_API_TOKEN_REQUESTED); UserMessage userMessage = new UserMessage(); - userMessage.setEmailAdress(userEmail); + userMessage.setEmailAddress(userEmail); /* * Security: we do NOT use userid inside this link - if some body got diff --git a/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/user/InternalInitialDataService.java b/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/user/InternalInitialDataService.java index 3396addcaf..7ad635289c 100644 --- a/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/user/InternalInitialDataService.java +++ b/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/user/InternalInitialDataService.java @@ -47,23 +47,23 @@ public class InternalInitialDataService { * gained administrator rights * * @param userId - * @param emailAdress - * @param fixApiToken - use "{nooop}" as prefix to prevent token encryption + * @param emailAddress + * @param fixApiToken - use "{nooop}" as prefix to prevent token encryption */ - public void createInitialAdmin(String userId, String emailAdress, String fixApiToken) { - internalCreateInitialUser(userId, emailAdress, fixApiToken, true); + public void createInitialAdmin(String userId, String emailAddress, String fixApiToken) { + internalCreateInitialUser(userId, emailAddress, fixApiToken, true); } /** * Creates an initial test user * * @param userId - * @param emailAdress + * @param emailAddress * @param unencryptedAPItoken - use "{nooop}" as prefix to prevent token * encryption */ - public void createInitialTestUser(String userId, String emailAdress, String unencryptedAPItoken) { - internalCreateInitialUser(userId, emailAdress, unencryptedAPItoken, false); + public void createInitialTestUser(String userId, String emailAddress, String unencryptedAPItoken) { + internalCreateInitialUser(userId, emailAddress, unencryptedAPItoken, false); } private void internalCreateInitialUser(String userId, String emailAddress, String unencryptedAPItoken, boolean createAsSuperAdmin) { @@ -121,7 +121,7 @@ private User createUser(String userId, String emailAddress, String fixApiToken, } else { user.hashedApiToken = encryptPassword(fixApiToken); } - user.emailAdress = emailAddress; + user.emailAddress = emailAddress; user.superAdmin = superAdmin; userRepository.save(user); @@ -174,7 +174,7 @@ private UserMessage createInitialUserAuthData(User user) { UserMessage authDataHashed = new UserMessage(); authDataHashed.setUserId(user.getName()); - authDataHashed.setEmailAdress(user.getEmailAdress()); + authDataHashed.setEmailAddress(user.getEmailAddress()); return authDataHashed; } diff --git a/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/user/User.java b/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/user/User.java index de3d168d06..26f178b4a0 100644 --- a/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/user/User.java +++ b/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/user/User.java @@ -37,7 +37,7 @@ public class User { public static final String COLUMN_USER_ONE_TIME_TOKEN_CREATED = "USER_OTT_CREATED"; public static final String COLUMN_USER_ENABLED = "USER_ENABLED"; - public static final String COLUMN_EMAIL_ADRESS = "USER_EMAIL_ADRESS"; + public static final String COLUMN_EMAIL_ADDRESS = "USER_EMAIL_ADDRESS"; public static final String COLUMN_USER_ROLES = "USER_ROLES"; public static final String COLUMN_USER_SUPERADMIN = "USER_SUPERADMIN"; public static final String COLUMN_USER_DEACTIVATED = "USER_DEACTIVATED"; @@ -54,8 +54,8 @@ public class User { @Column(name = COLUMN_USER_ID, unique = true, nullable = false) String name; - @Column(name = COLUMN_EMAIL_ADRESS, unique = true, nullable = false) - String emailAdress; + @Column(name = COLUMN_EMAIL_ADDRESS, unique = true, nullable = false) + String emailAddress; @Column(name = COLUMN_USER_HASHED_API_TOKEN, nullable = false) String hashedApiToken; @@ -100,8 +100,8 @@ public boolean isDeactivated() { return deactivated; } - public String getEmailAdress() { - return emailAdress; + public String getEmailAddress() { + return emailAddress; } public String getName() { diff --git a/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/user/UserCreationService.java b/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/user/UserCreationService.java index fd5ae0be1c..2208d9849f 100644 --- a/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/user/UserCreationService.java +++ b/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/user/UserCreationService.java @@ -81,14 +81,14 @@ public void createUserFromSelfRegistration(String userId) { return; } - String emailAdress = selfRegistration.get().getEmailAdress(); - assertion.assertIsValidEmailAddress(emailAdress); + String emailAddress = selfRegistration.get().getEmailAddress(); + assertion.assertIsValidEmailAddress(emailAddress); - found = userRepository.findByEmailAdress(emailAdress); + found = userRepository.findByEmailAddress(emailAddress); if (found.isPresent()) { - LOG.warn("Self registration coming in for user:{} but mailadress {} already exists. So just removing self registration entry", sanitizedLogUserId, - emailAdress); + LOG.warn("Self registration coming in for user:{} but email address {} already exists. So just removing self registration entry", + sanitizedLogUserId, emailAddress); selfRegistrationRepository.deleteById(userId); return; } @@ -99,7 +99,7 @@ public void createUserFromSelfRegistration(String userId) { user.name = userId; user.hashedApiToken = "";// leave it empty, so API auth is disabled - will be filled later after user has // clicked to link - user.emailAdress = emailAdress; + user.emailAddress = emailAddress; user.oneTimeToken = oneTimeToken; user.oneTimeTokenDate = new Date(); @@ -132,7 +132,7 @@ private void informUserAboutSignupAccepted(User user) { /* we just send info about new api token */ DomainMessage infoRequest = new DomainMessage(MessageID.USER_NEW_API_TOKEN_REQUESTED); UserMessage userMessage = new UserMessage(); - userMessage.setEmailAdress(user.getEmailAdress()); + userMessage.setEmailAddress(user.getEmailAddress()); /* * Security: we do NOT use userid inside this link - if some body got @@ -153,7 +153,7 @@ private UserMessage createInitialUserAuthData(User user) { UserMessage authDataHashed = new UserMessage(); authDataHashed.setUserId(user.getName()); - authDataHashed.setEmailAdress(user.getEmailAdress()); + authDataHashed.setEmailAddress(user.getEmailAddress()); return authDataHashed; } diff --git a/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/user/UserDeleteService.java b/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/user/UserDeleteService.java index 424b702d8f..3d9fe39669 100644 --- a/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/user/UserDeleteService.java +++ b/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/user/UserDeleteService.java @@ -68,7 +68,7 @@ public void deleteUser(String userId) { /* create message containing data before user is deleted */ UserMessage message = new UserMessage(); message.setUserId(user.getName()); - message.setEmailAdress(user.getEmailAdress()); + message.setEmailAddress(user.getEmailAddress()); userRepository.deleteUserWithAssociations(user.getName()); diff --git a/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/user/UserDetailInformation.java b/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/user/UserDetailInformation.java index 54b97eea3d..46fab0a603 100644 --- a/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/user/UserDetailInformation.java +++ b/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/user/UserDetailInformation.java @@ -32,7 +32,7 @@ public class UserDetailInformation { public UserDetailInformation(User user) { this.userId = user.getName(); - this.email = user.getEmailAdress(); + this.email = user.getEmailAddress(); for (Project project : user.getProjects()) { this.projects.add(project.getId()); diff --git a/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/user/UserDetailInformationService.java b/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/user/UserDetailInformationService.java index e9c4b405bd..76115c02d2 100644 --- a/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/user/UserDetailInformationService.java +++ b/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/user/UserDetailInformationService.java @@ -63,7 +63,7 @@ public UserDetailInformation fetchDetailsByEmailAddress(String emailAddress) { assertion.assertIsValidEmailAddress(emailAddress); - User user = userRepository.findOrFailUserByEmailAdress(emailAddress); + User user = userRepository.findOrFailUserByEmailAddress(emailAddress); return new UserDetailInformation(user); } diff --git a/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/user/UserEmailAddressUpdateService.java b/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/user/UserEmailAddressUpdateService.java index 464bd5f14d..5e27aa8170 100644 --- a/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/user/UserEmailAddressUpdateService.java +++ b/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/user/UserEmailAddressUpdateService.java @@ -56,20 +56,20 @@ public void updateUserEmailAddress(String userId, String newEmailAddress) { assertion.assertIsValidEmailAddress(newEmailAddress); User user = userRepository.findOrFailUser(userId); - String formerEmailAddress = user.getEmailAdress(); + String formerEmailAddress = user.getEmailAddress(); if (newEmailAddress.equalsIgnoreCase(formerEmailAddress)) { throw new NotAcceptableException("User has already this email address"); } /* parameters valid, we audit log the change */ - auditLogService.log("Changed email adress of user {}", logSanitizer.sanitize(userId, 30)); + auditLogService.log("Changed email address of user {}", logSanitizer.sanitize(userId, 30)); - user.emailAdress = newEmailAddress; + user.emailAddress = newEmailAddress; /* create message containing data before user email has changed */ UserMessage message = new UserMessage(); message.setUserId(user.getName()); - message.setEmailAdress(user.getEmailAdress()); + message.setEmailAddress(user.getEmailAddress()); message.setFormerEmailAddress(formerEmailAddress); message.setSubject("A SecHub administrator has changed your email address"); diff --git a/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/user/UserGrantSuperAdminRightsService.java b/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/user/UserGrantSuperAdminRightsService.java index b66e0f88a6..c522b58efd 100644 --- a/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/user/UserGrantSuperAdminRightsService.java +++ b/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/user/UserGrantSuperAdminRightsService.java @@ -76,7 +76,7 @@ public void grantSuperAdminRightsFor(String userId) { @IsSendingAsyncMessage(MessageID.USER_BECOMES_SUPERADMIN) private void informUserBecomesSuperadmin(User user) { eventBusService - .sendAsynchron(DomainMessageFactory.createUserBecomesSuperAdmin(user.getName(), user.getEmailAdress(), sechubEnvironment.getServerBaseUrl())); + .sendAsynchron(DomainMessageFactory.createUserBecomesSuperAdmin(user.getName(), user.getEmailAddress(), sechubEnvironment.getServerBaseUrl())); } @IsSendingAsyncMessage(MessageID.REQUEST_USER_ROLE_RECALCULATION) diff --git a/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/user/UserRepository.java b/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/user/UserRepository.java index 5b5bf9ade3..b529ec74c5 100644 --- a/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/user/UserRepository.java +++ b/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/user/UserRepository.java @@ -19,10 +19,10 @@ public default User findOrFailUser(String userId) { return foundUser.get(); } - Optional findByEmailAdress(String emailAdress); + Optional findByEmailAddress(String emailAddress); - public default User findOrFailUserByEmailAdress(String emailAddress) { - Optional foundUser = findByEmailAdress(emailAddress); + public default User findOrFailUserByEmailAddress(String emailAddress) { + Optional foundUser = findByEmailAddress(emailAddress); if (!foundUser.isPresent()) { throw new NotFoundException("No user with email address '" + emailAddress + "' found!"); } diff --git a/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/user/UserRevokeSuperAdminRightsService.java b/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/user/UserRevokeSuperAdminRightsService.java index 02823e682a..d337209910 100644 --- a/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/user/UserRevokeSuperAdminRightsService.java +++ b/sechub-administration/src/main/java/com/mercedesbenz/sechub/domain/administration/user/UserRevokeSuperAdminRightsService.java @@ -90,7 +90,7 @@ private void assertNotLastSuperAdmin() { @IsSendingAsyncMessage(MessageID.USER_NO_LONGER_SUPERADMIN) private void informUserNoLongerSuperadmin(User user) { eventBusService - .sendAsynchron(DomainMessageFactory.createUserNoLongerSuperAdmin(user.getName(), user.getEmailAdress(), secHubEnvironment.getServerBaseUrl())); + .sendAsynchron(DomainMessageFactory.createUserNoLongerSuperAdmin(user.getName(), user.getEmailAddress(), secHubEnvironment.getServerBaseUrl())); } @IsSendingAsyncMessage(MessageID.REQUEST_USER_ROLE_RECALCULATION) diff --git a/sechub-administration/src/test/java/com/mercedesbenz/sechub/domain/administration/UserRepositoryDBTest.java b/sechub-administration/src/test/java/com/mercedesbenz/sechub/domain/administration/UserRepositoryDBTest.java index fb7093cd2b..855c23d026 100644 --- a/sechub-administration/src/test/java/com/mercedesbenz/sechub/domain/administration/UserRepositoryDBTest.java +++ b/sechub-administration/src/test/java/com/mercedesbenz/sechub/domain/administration/UserRepositoryDBTest.java @@ -60,19 +60,19 @@ public void before() { } @Test - public void findOrFailUserByEmailAdress_user_found_by_email_address() { + public void findOrFailUserByEmailAddress_user_found_by_email_address() { /* execute */ - User user = userRepository.findOrFailUserByEmailAdress("db_test_testuser1@example.org"); + User user = userRepository.findOrFailUserByEmailAddress("db_test_testuser1@example.org"); /* test */ assertEquals(user1, user); } @Test - public void findOrFailUserByEmailAdress_user_NOT_found_by_email_address() { + public void findOrFailUserByEmailAddress_user_NOT_found_by_email_address() { /* execute */ NotFoundException exception = assertThrows(NotFoundException.class, - () -> userRepository.findOrFailUserByEmailAdress("db_test_testuser_not_existing@example.org")); + () -> userRepository.findOrFailUserByEmailAddress("db_test_testuser_not_existing@example.org")); /* test */ assertEquals("No user with email address 'db_test_testuser_not_existing@example.org' found!", exception.getMessage()); diff --git a/sechub-administration/src/test/java/com/mercedesbenz/sechub/domain/administration/signup/AnonymousSignupRestControllerMockTest.java b/sechub-administration/src/test/java/com/mercedesbenz/sechub/domain/administration/signup/AnonymousSignupRestControllerMockTest.java index bf591fc69e..0f14102b90 100644 --- a/sechub-administration/src/test/java/com/mercedesbenz/sechub/domain/administration/signup/AnonymousSignupRestControllerMockTest.java +++ b/sechub-administration/src/test/java/com/mercedesbenz/sechub/domain/administration/signup/AnonymousSignupRestControllerMockTest.java @@ -65,7 +65,7 @@ public void calling_with_api_1_0_and_valid_userid_and_email_calls_signup_create_ this.mockMvc.perform( post(https(PORT_USED).buildUserSignUpUrl()). contentType(MediaType.APPLICATION_JSON_VALUE). - content("{\"apiVersion\":\"1.0\",\"userId\":\"valid_userid\",\"emailAdress\":\"valid_mailadress@test.com\"}") + content("{\"apiVersion\":\"1.0\",\"userId\":\"valid_userid\",\"emailAddress\":\"valid_emailaddress@test.com\"}") ). andExpect(status().isOk() ); @@ -82,7 +82,7 @@ public void calling_with_api_X_0_and_valid_userid_and_email_returns_HTTP_400_BAD this.mockMvc.perform( post(https(PORT_USED).buildUserSignUpUrl()). contentType(MediaType.APPLICATION_JSON_VALUE). - content("{\"apiVersion\":\"X.0\",\"userId\":\"\",\"emailAdress\":\"test@test.com\"}") + content("{\"apiVersion\":\"X.0\",\"userId\":\"\",\"emailAddress\":\"test@test.com\"}") ). andExpect(status().isBadRequest() ); @@ -163,7 +163,7 @@ private SignupJsonInput createUserSelfRegistration(String api, String email, Str SignupJsonInput created = new SignupJsonInput(); created.setApiVersion(api); - created.setEmailAdress(email); + created.setEmailAddress(email); created.setUserId(name); return created; } diff --git a/sechub-administration/src/test/java/com/mercedesbenz/sechub/domain/administration/signup/SignupAdministrationRestControllerMockTest.java b/sechub-administration/src/test/java/com/mercedesbenz/sechub/domain/administration/signup/SignupAdministrationRestControllerMockTest.java index d5eec56574..bfe18f5c7e 100644 --- a/sechub-administration/src/test/java/com/mercedesbenz/sechub/domain/administration/signup/SignupAdministrationRestControllerMockTest.java +++ b/sechub-administration/src/test/java/com/mercedesbenz/sechub/domain/administration/signup/SignupAdministrationRestControllerMockTest.java @@ -69,11 +69,11 @@ public void listUserSignups_results_in_a_filled_list_when_2_signups_exist() thro /* prepare */ List list = new ArrayList<>(); Signup signup1 = new Signup(); - signup1.setEmailAdress("sechub.test1@example.org"); + signup1.setEmailAddress("sechub.test1@example.org"); signup1.setUserId("sechub.test1"); Signup signup2 = new Signup(); - signup2.setEmailAdress("sechub.test2@example.org"); + signup2.setEmailAddress("sechub.test2@example.org"); signup2.setUserId("sechub.test2"); list.add(signup1); @@ -86,10 +86,10 @@ public void listUserSignups_results_in_a_filled_list_when_2_signups_exist() thro ). andExpect(status().isOk()). andExpect(jsonPath("$.[0].userId", equalTo("sechub.test1"))). - andExpect(jsonPath("$.[0].emailAdress", equalTo("sechub.test1@example.org"))). + andExpect(jsonPath("$.[0].emailAddress", equalTo("sechub.test1@example.org"))). andExpect(jsonPath("$.[1].userId", equalTo("sechub.test2"))). - andExpect(jsonPath("$.[1].emailAdress", equalTo("sechub.test2@example.org")) + andExpect(jsonPath("$.[1].emailAddress", equalTo("sechub.test2@example.org")) ); diff --git a/sechub-administration/src/test/java/com/mercedesbenz/sechub/domain/administration/signup/SignupCreateServiceTest.java b/sechub-administration/src/test/java/com/mercedesbenz/sechub/domain/administration/signup/SignupCreateServiceTest.java index fdf4d22896..abc1f6a91b 100644 --- a/sechub-administration/src/test/java/com/mercedesbenz/sechub/domain/administration/signup/SignupCreateServiceTest.java +++ b/sechub-administration/src/test/java/com/mercedesbenz/sechub/domain/administration/signup/SignupCreateServiceTest.java @@ -37,7 +37,7 @@ public void a_created_signup_sends_event_containing_userid_and_email() { /* prepare */ SignupJsonInput userSelfRegistrationInput = mock(SignupJsonInput.class); when(userSelfRegistrationInput.getUserId()).thenReturn("schlaubi"); - when(userSelfRegistrationInput.getEmailAdress()).thenReturn("schlaubi@schlumpfhausen.de"); + when(userSelfRegistrationInput.getEmailAddress()).thenReturn("schlaubi@schlumpfhausen.de"); /* execute */ serviceToTest.register(userSelfRegistrationInput); @@ -52,7 +52,7 @@ public void a_created_signup_sends_event_containing_userid_and_email() { assertNotNull("no signup data inside message!", signupDataInMessage); // check event contains expected data assertEquals("schlaubi", signupDataInMessage.getUserId()); - assertEquals("schlaubi@schlumpfhausen.de", signupDataInMessage.getEmailAdress()); + assertEquals("schlaubi@schlumpfhausen.de", signupDataInMessage.getEmailAddress()); } } diff --git a/sechub-administration/src/test/java/com/mercedesbenz/sechub/domain/administration/user/AnonymousUserRequestsNewApiTokenServiceTest.java b/sechub-administration/src/test/java/com/mercedesbenz/sechub/domain/administration/user/AnonymousUserRequestsNewApiTokenServiceTest.java index b127d1e383..125940d04d 100644 --- a/sechub-administration/src/test/java/com/mercedesbenz/sechub/domain/administration/user/AnonymousUserRequestsNewApiTokenServiceTest.java +++ b/sechub-administration/src/test/java/com/mercedesbenz/sechub/domain/administration/user/AnonymousUserRequestsNewApiTokenServiceTest.java @@ -50,35 +50,35 @@ public void before() { @Test public void service_uses_assertion_validate_mail() throws Exception { /* execute */ - serviceToTest.anonymousRequestToGetNewApiTokenForUserMailAdress("user@test.com"); + serviceToTest.anonymousRequestToGetNewApiTokenForUserEmailAddress("user@test.com"); /* test */ verify(mockedUserAssertion).assertIsValidEmailAddress("user@test.com"); } @Test - public void when_emailadress_not_found_no_exception_is_thrown() throws Exception { + public void when_emailaddress_not_found_no_exception_is_thrown() throws Exception { /* prepare */ - when(mockedUserRepository.findByEmailAdress("user@test.com")).thenReturn(Optional.empty()); + when(mockedUserRepository.findByEmailAddress("user@test.com")).thenReturn(Optional.empty()); /* execute */ - serviceToTest.anonymousRequestToGetNewApiTokenForUserMailAdress("user@test.com"); + serviceToTest.anonymousRequestToGetNewApiTokenForUserEmailAddress("user@test.com"); } @Test - public void when_emailadress_found_a_new_async_event_is_sent_eventbus() throws Exception { + public void when_emailaddress_found_a_new_async_event_is_sent_eventbus() throws Exception { User user = new User(); - user.emailAdress = "user@test.com"; + user.emailAddress = "user@test.com"; user.name = "testuser"; /* prepare */ - when(mockedUserRepository.findByEmailAdress("user@test.com")).thenReturn(Optional.of(user)); + when(mockedUserRepository.findByEmailAddress("user@test.com")).thenReturn(Optional.of(user)); /* execute */ - serviceToTest.anonymousRequestToGetNewApiTokenForUserMailAdress("user@test.com"); + serviceToTest.anonymousRequestToGetNewApiTokenForUserEmailAddress("user@test.com"); /* test */ ArgumentCaptor domainMessageCaptor = ArgumentCaptor.forClass(DomainMessage.class); @@ -90,22 +90,22 @@ public void when_emailadress_found_a_new_async_event_is_sent_eventbus() throws E assertNotNull("no refersh api key data inside message!", refreshApiKeyMessage); // check event contains expected data assertNull(refreshApiKeyMessage.getUserId()); // user id not inside - assertEquals("user@test.com", refreshApiKeyMessage.getEmailAdress()); + assertEquals("user@test.com", refreshApiKeyMessage.getEmailAddress()); } @Test - public void when_emailadress_found__onetimetoken_created_and_persisted() throws Exception { + public void when_emailaddress_found__onetimetoken_created_and_persisted() throws Exception { User user = new User(); - user.emailAdress = "user@test.com"; + user.emailAddress = "user@test.com"; user.name = "testuser"; /* prepare */ - when(mockedUserRepository.findByEmailAdress("user@test.com")).thenReturn(Optional.of(user)); + when(mockedUserRepository.findByEmailAddress("user@test.com")).thenReturn(Optional.of(user)); /* execute */ - serviceToTest.anonymousRequestToGetNewApiTokenForUserMailAdress("user@test.com"); + serviceToTest.anonymousRequestToGetNewApiTokenForUserEmailAddress("user@test.com"); /* test */ assertEquals(FAKE_ONE_TIME_TOKEN, user.oneTimeToken); diff --git a/sechub-administration/src/test/java/com/mercedesbenz/sechub/domain/administration/user/TestUserCreationFactory.java b/sechub-administration/src/test/java/com/mercedesbenz/sechub/domain/administration/user/TestUserCreationFactory.java index 70b6a744bf..f357f7535f 100644 --- a/sechub-administration/src/test/java/com/mercedesbenz/sechub/domain/administration/user/TestUserCreationFactory.java +++ b/sechub-administration/src/test/java/com/mercedesbenz/sechub/domain/administration/user/TestUserCreationFactory.java @@ -6,7 +6,7 @@ public class TestUserCreationFactory { public static User createUser(String userId) { User user = new User(); user.name = userId; - user.emailAdress = userId + "@example.org"; + user.emailAddress = userId + "@example.org"; user.hashedApiToken = "12345678"; return user; } diff --git a/sechub-administration/src/test/java/com/mercedesbenz/sechub/domain/administration/user/UserAdministrationRestControllerMockTest.java b/sechub-administration/src/test/java/com/mercedesbenz/sechub/domain/administration/user/UserAdministrationRestControllerMockTest.java index cedb0a665f..0949286721 100644 --- a/sechub-administration/src/test/java/com/mercedesbenz/sechub/domain/administration/user/UserAdministrationRestControllerMockTest.java +++ b/sechub-administration/src/test/java/com/mercedesbenz/sechub/domain/administration/user/UserAdministrationRestControllerMockTest.java @@ -94,7 +94,7 @@ public void show_user_details_returns_result_of_detail_service() throws Exceptio /* prepare */ User user = mock(User.class); when(user.getName()).thenReturn("user1"); - when(user.getEmailAdress()).thenReturn("user1@example.org"); + when(user.getEmailAddress()).thenReturn("user1@example.org"); Set projects = new LinkedHashSet<>(); Project project1 = mock(Project.class); @@ -126,7 +126,7 @@ public void show_user_details_for_email_address_returns_result_of_detail_service User user = mock(User.class); when(user.getName()).thenReturn(userId); - when(user.getEmailAdress()).thenReturn(emailAddress); + when(user.getEmailAddress()).thenReturn(emailAddress); Set projects = new LinkedHashSet<>(); Project project1 = mock(Project.class); diff --git a/sechub-administration/src/test/java/com/mercedesbenz/sechub/domain/administration/user/UserEmailAddressUpdateServiceTest.java b/sechub-administration/src/test/java/com/mercedesbenz/sechub/domain/administration/user/UserEmailAddressUpdateServiceTest.java index 2d8c2c30d3..93659e6932 100644 --- a/sechub-administration/src/test/java/com/mercedesbenz/sechub/domain/administration/user/UserEmailAddressUpdateServiceTest.java +++ b/sechub-administration/src/test/java/com/mercedesbenz/sechub/domain/administration/user/UserEmailAddressUpdateServiceTest.java @@ -116,7 +116,7 @@ void asserts_email_parameter_before_user_is_fetched_from_db() { doThrow(TestCanaryException.class).when(assertion).assertIsValidEmailAddress(any()); /* execute + test */ - assertThrows(TestCanaryException.class, () -> serviceToTest.updateUserEmailAddress("notfound", "not-a-valid-email-adress")); + assertThrows(TestCanaryException.class, () -> serviceToTest.updateUserEmailAddress("notfound", "not-a-valid-email-address")); } @Test @@ -138,7 +138,7 @@ void when_assertions_do_not_handle_null_email_user_repository_would_be_called_wi } @Test - void throws_not_acceptable_when_same_mail_adress_as_before() { + void throws_not_acceptable_when_same_email_address_as_before() { /* prepare */ User knownUser1 = createKnownUser1(); when(userRepository.findOrFailUser(KNOWN_USER1)).thenReturn(knownUser1); @@ -169,7 +169,7 @@ void saves_user_when_parameters_are_valid() { // check the user object has new mail address when saved: ArgumentCaptor userCaptor = ArgumentCaptor.forClass(User.class); verify(userRepository).save(userCaptor.capture()); - assertEquals("new.user1@example.com", userCaptor.getValue().getEmailAdress()); + assertEquals("new.user1@example.com", userCaptor.getValue().getEmailAddress()); } @Test @@ -189,14 +189,14 @@ void sends_event_with_user_data_when_parameters_are_valid() { assertNotNull(userMessage); assertEquals(KNOWN_USER1, userMessage.getUserId()); - assertEquals("new.user1@example.com", userMessage.getEmailAdress()); + assertEquals("new.user1@example.com", userMessage.getEmailAddress()); assertEquals("former.user1@example.com", userMessage.getFormerEmailAddress()); } private User createKnownUser1() { User user = new User(); user.name = KNOWN_USER1; - user.emailAdress = "former.user1@example.com"; + user.emailAddress = "former.user1@example.com"; return user; } diff --git a/sechub-api-java/src/main/java/com/mercedesbenz/sechub/api/MockedSecHubClient.java b/sechub-api-java/src/main/java/com/mercedesbenz/sechub/api/MockedSecHubClient.java index 7e613a31ce..16ff427e2e 100644 --- a/sechub-api-java/src/main/java/com/mercedesbenz/sechub/api/MockedSecHubClient.java +++ b/sechub-api-java/src/main/java/com/mercedesbenz/sechub/api/MockedSecHubClient.java @@ -130,7 +130,7 @@ public void createSignup(UserSignup signUp) throws SecHubClientException { throw new SecHubClientException("User already exists!"); } OpenUserSignup openSignup = new OpenUserSignup(); - openSignup.setEmailAdress(signUp.getEmailAdress()); + openSignup.setEmailAddress(signUp.getEmailAddress()); openSignup.setUserId(userId); openSignups.put(userId, openSignup); } @@ -272,7 +272,7 @@ public Path downloadFullScanLog(UUID sechubJobUUID, Path downloadFilePath) throw } private User createUser(OpenUserSignup found) { - return new User(found.getUserId(), found.getEmailAdress()); + return new User(found.getUserId(), found.getEmailAddress()); } private String createUserToProjectUniqueIdentifier(String user, String projectId) { diff --git a/sechub-api-java/src/main/java/com/mercedesbenz/sechub/api/OpenUserSignup.java b/sechub-api-java/src/main/java/com/mercedesbenz/sechub/api/OpenUserSignup.java index 1cc3a0e4c6..f130bf1c27 100644 --- a/sechub-api-java/src/main/java/com/mercedesbenz/sechub/api/OpenUserSignup.java +++ b/sechub-api-java/src/main/java/com/mercedesbenz/sechub/api/OpenUserSignup.java @@ -50,16 +50,16 @@ com.mercedesbenz.sechub.api.internal.gen.model.OpenApiListOfSignupsInner getDele return internalAccess.getDelegate(); } - public String getEmailAdress() { - return internalAccess.getEmailAdress(); + public String getEmailAddress() { + return internalAccess.getEmailAddress(); } public String getUserId() { return internalAccess.getUserId(); } - public void setEmailAdress(String emailAdress) { - internalAccess.setEmailAdress(emailAdress); + public void setEmailAddress(String emailAddress) { + internalAccess.setEmailAddress(emailAddress); } public void setUserId(String userId) { diff --git a/sechub-api-java/src/main/java/com/mercedesbenz/sechub/api/UserSignup.java b/sechub-api-java/src/main/java/com/mercedesbenz/sechub/api/UserSignup.java index e835e38bee..9091c6bd80 100644 --- a/sechub-api-java/src/main/java/com/mercedesbenz/sechub/api/UserSignup.java +++ b/sechub-api-java/src/main/java/com/mercedesbenz/sechub/api/UserSignup.java @@ -54,8 +54,8 @@ public String getApiVersion() { return internalAccess.getApiVersion(); } - public String getEmailAdress() { - return internalAccess.getEmailAdress(); + public String getEmailAddress() { + return internalAccess.getEmailAddress(); } public String getUserId() { @@ -66,8 +66,8 @@ public void setApiVersion(String apiVersion) { internalAccess.setApiVersion(apiVersion); } - public void setEmailAdress(String emailAdress) { - internalAccess.setEmailAdress(emailAdress); + public void setEmailAddress(String emailAddress) { + internalAccess.setEmailAddress(emailAddress); } public void setUserId(String userId) { diff --git a/sechub-api-java/src/main/java/com/mercedesbenz/sechub/api/internal/model/InternalAccessOpenUserSignup.java b/sechub-api-java/src/main/java/com/mercedesbenz/sechub/api/internal/model/InternalAccessOpenUserSignup.java index 7a9f062cfd..bfa0380bc2 100644 --- a/sechub-api-java/src/main/java/com/mercedesbenz/sechub/api/internal/model/InternalAccessOpenUserSignup.java +++ b/sechub-api-java/src/main/java/com/mercedesbenz/sechub/api/internal/model/InternalAccessOpenUserSignup.java @@ -31,16 +31,16 @@ protected void initDelegateWithDefaults() { /* child classes can override this */ } - public String getEmailAdress() { - return delegate.getEmailAdress(); + public String getEmailAddress() { + return delegate.getEmailAddress(); } public String getUserId() { return delegate.getUserId(); } - public void setEmailAdress(String emailAdress) { - delegate.setEmailAdress(emailAdress); + public void setEmailAddress(String emailAddress) { + delegate.setEmailAddress(emailAddress); } public void setUserId(String userId) { diff --git a/sechub-api-java/src/main/java/com/mercedesbenz/sechub/api/internal/model/InternalAccessUserSignup.java b/sechub-api-java/src/main/java/com/mercedesbenz/sechub/api/internal/model/InternalAccessUserSignup.java index 9daf521f73..2064cc2ff6 100644 --- a/sechub-api-java/src/main/java/com/mercedesbenz/sechub/api/internal/model/InternalAccessUserSignup.java +++ b/sechub-api-java/src/main/java/com/mercedesbenz/sechub/api/internal/model/InternalAccessUserSignup.java @@ -35,8 +35,8 @@ public String getApiVersion() { return delegate.getApiVersion(); } - public String getEmailAdress() { - return delegate.getEmailAdress(); + public String getEmailAddress() { + return delegate.getEmailAddress(); } public String getUserId() { @@ -47,8 +47,8 @@ public void setApiVersion(String apiVersion) { delegate.setApiVersion(apiVersion); } - public void setEmailAdress(String emailAdress) { - delegate.setEmailAdress(emailAdress); + public void setEmailAddress(String emailAddress) { + delegate.setEmailAddress(emailAddress); } public void setUserId(String userId) { diff --git a/sechub-api-java/src/test/java/com/mercedesbenz/sechub/api/MockedSecHubClientTest.java b/sechub-api-java/src/test/java/com/mercedesbenz/sechub/api/MockedSecHubClientTest.java index 05639da7bb..74d4effb9d 100644 --- a/sechub-api-java/src/test/java/com/mercedesbenz/sechub/api/MockedSecHubClientTest.java +++ b/sechub-api-java/src/test/java/com/mercedesbenz/sechub/api/MockedSecHubClientTest.java @@ -68,7 +68,7 @@ void mock_user_signup() throws Exception { /* execute */ UserSignup signup = new UserSignup(); signup.setUserId("somebody"); - signup.setEmailAdress("somebody@example.org"); + signup.setEmailAddress("somebody@example.org"); clientToTest.createSignup(signup); diff --git a/sechub-api-java/src/test/resources/test_sechub_report-1.json b/sechub-api-java/src/test/resources/test_sechub_report-1.json index 9d956dd9de..e891430b93 100644 --- a/sechub-api-java/src/test/resources/test_sechub_report-1.json +++ b/sechub-api-java/src/test/resources/test_sechub_report-1.json @@ -1138,7 +1138,7 @@ "location": "com/mercedesbenz/sechub/domain/notification/email/MockEmailRestController.java", "line": 41, "column": 4, - "source": "\t\t\tpath = APIConstants.API_ANONYMOUS+\"integrationtest/mock/emails/to/{emailAdress}\", ", + "source": "\t\t\tpath = APIConstants.API_ANONYMOUS+\"integrationtest/mock/emails/to/{emailAddress}\", ", "relevantPart": "path" }, "type": "codeScan", @@ -4449,37 +4449,37 @@ "location": "com/mercedesbenz/sechub/domain/administration/user/AnonymousUserRequestNewApiTokenRestController.java", "line": 35, "column": 106, - "source": "\tpublic void anonymousRequestToGetNewApiTokenForUserMailAdress(@PathVariable(name=\"emailAddress\") String emailAdress) {", - "relevantPart": "emailAdress", + "source": "\tpublic void anonymousRequestToGetNewApiTokenForUserMailAddress(@PathVariable(name=\"emailAddress\") String emailAddress) {", + "relevantPart": "emailAddress", "calls": { "location": "com/mercedesbenz/sechub/domain/administration/user/AnonymousUserRequestNewApiTokenRestController.java", "line": 37, "column": 72, - "source": "\t\tnewApiTokenService.anonymousRequestToGetNewApiTokenForUserMailAdress(emailAdress);", - "relevantPart": "emailAdress", + "source": "\t\tnewApiTokenService.anonymousRequestToGetNewApiTokenForUserMailAddress(emailAddress);", + "relevantPart": "emailAddress", "calls": { "location": "com/mercedesbenz/sechub/domain/administration/user/AnonymousUserRequestsNewApiTokenService.java", "line": 47, "column": 71, - "source": "\tpublic void anonymousRequestToGetNewApiTokenForUserMailAdress(String userEmail) {", + "source": "\tpublic void anonymousRequestToGetNewApiTokenForUserMailAddress(String userEmail) {", "relevantPart": "userEmail", "calls": { "location": "com/mercedesbenz/sechub/domain/administration/user/AnonymousUserRequestsNewApiTokenService.java", "line": 52, "column": 59, - "source": "\t\tOptional found = userRepository.findByEmailAdress(userEmail);", + "source": "\t\tOptional found = userRepository.findByEmailAddress(userEmail);", "relevantPart": "userEmail", "calls": { "location": "com/mercedesbenz/sechub/domain/administration/user/AnonymousUserRequestsNewApiTokenService.java", "line": 52, "column": 58, - "source": "\t\tOptional found = userRepository.findByEmailAdress(userEmail);", - "relevantPart": "findByEmailAdress", + "source": "\t\tOptional found = userRepository.findByEmailAddress(userEmail);", + "relevantPart": "findByEmailAddress", "calls": { "location": "com/mercedesbenz/sechub/domain/administration/user/AnonymousUserRequestsNewApiTokenService.java", "line": 52, "column": 18, - "source": "\t\tOptional found = userRepository.findByEmailAdress(userEmail);", + "source": "\t\tOptional found = userRepository.findByEmailAddress(userEmail);", "relevantPart": "found", "calls": { "location": "com/mercedesbenz/sechub/domain/administration/user/AnonymousUserRequestsNewApiTokenService.java", @@ -4610,32 +4610,32 @@ "location": "com/mercedesbenz/sechub/domain/administration/user/UserCreationService.java", "line": 87, "column": 24, - "source": "\t\tString emailAdress = selfRegistration.get().getEmailAdress();", + "source": "\t\tString emailAddress = selfRegistration.get().getEmailAddress();", "relevantPart": "selfRegistration", "calls": { "location": "com/mercedesbenz/sechub/domain/administration/user/UserCreationService.java", "line": 87, "column": 44, - "source": "\t\tString emailAdress = selfRegistration.get().getEmailAdress();", + "source": "\t\tString emailAddress = selfRegistration.get().getEmailAddress();", "relevantPart": "get", "calls": { "location": "com/mercedesbenz/sechub/domain/administration/user/UserCreationService.java", "line": 87, "column": 61, - "source": "\t\tString emailAdress = selfRegistration.get().getEmailAdress();", - "relevantPart": "getEmailAdress", + "source": "\t\tString emailAddress = selfRegistration.get().getEmailAddress();", + "relevantPart": "getEmailAddress", "calls": { "location": "com/mercedesbenz/sechub/domain/administration/user/UserCreationService.java", "line": 87, "column": 10, - "source": "\t\tString emailAdress = selfRegistration.get().getEmailAdress();", - "relevantPart": "emailAdress", + "source": "\t\tString emailAddress = selfRegistration.get().getEmailAddress();", + "relevantPart": "emailAddress", "calls": { "location": "com/mercedesbenz/sechub/domain/administration/user/UserCreationService.java", "line": 95, "column": 26, - "source": "\t\t\t\t\tsanitizedLogUserId, emailAdress);", - "relevantPart": "emailAdress", + "source": "\t\t\t\t\tsanitizedLogUserId, emailAddress);", + "relevantPart": "emailAddress", "calls": { "location": "com/mercedesbenz/sechub/domain/administration/user/UserCreationService.java", "line": 93, diff --git a/sechub-developertools/scripts/sechub-api.sh b/sechub-developertools/scripts/sechub-api.sh old mode 100755 new mode 100644 index fc7e8f18b9..a09e69ec1c --- a/sechub-developertools/scripts/sechub-api.sh +++ b/sechub-developertools/scripts/sechub-api.sh @@ -799,7 +799,7 @@ function generate_sechub_user_signup_data { { "apiVersion":"$SECHUB_API_VERSION", "userId":"$1", - "emailAdress":"$2" + "emailAddress":"$2" } EOF } diff --git a/sechub-developertools/src/main/java/com/mercedesbenz/sechub/developertools/admin/DeveloperAdministration.java b/sechub-developertools/src/main/java/com/mercedesbenz/sechub/developertools/admin/DeveloperAdministration.java index 436e72da63..0f8e48ca60 100644 --- a/sechub-developertools/src/main/java/com/mercedesbenz/sechub/developertools/admin/DeveloperAdministration.java +++ b/sechub-developertools/src/main/java/com/mercedesbenz/sechub/developertools/admin/DeveloperAdministration.java @@ -340,7 +340,7 @@ public String revokeAddminRightsFrom(String targetUser) { public String createNewUserSignup(String name, String email) { - String json = "{\"apiVersion\":\"1.0\",\r\n" + " \"userId\":\"" + name + "\",\r\n" + " \"emailAdress\":\"" + email + "\"}"; + String json = "{\"apiVersion\":\"1.0\",\r\n" + " \"userId\":\"" + name + "\",\r\n" + " \"emailAddress\":\"" + email + "\"}"; return getRestHelper().postJson(getUrlBuilder().buildUserSignUpUrl(), json); } diff --git a/sechub-developertools/src/main/java/com/mercedesbenz/sechub/developertools/admin/ui/action/integrationtestserver/FetchMockMailsAction.java b/sechub-developertools/src/main/java/com/mercedesbenz/sechub/developertools/admin/ui/action/integrationtestserver/FetchMockMailsAction.java index 126eef0afb..8c940b7df1 100644 --- a/sechub-developertools/src/main/java/com/mercedesbenz/sechub/developertools/admin/ui/action/integrationtestserver/FetchMockMailsAction.java +++ b/sechub-developertools/src/main/java/com/mercedesbenz/sechub/developertools/admin/ui/action/integrationtestserver/FetchMockMailsAction.java @@ -19,11 +19,11 @@ public FetchMockMailsAction(UIContext context) { @Override protected void executeImplAfterRestHelperSwitched(ActionEvent e) { - Optional emailAdress = getUserInput("Please enter userid to fetch mock mails", InputCacheIdentifier.EMAILADRESS); - if (!emailAdress.isPresent()) { + Optional emailAddress = getUserInput("Please enter userid to fetch mock mails", InputCacheIdentifier.EMAILADDRESS); + if (!emailAddress.isPresent()) { return; } - List data = IntegrationTestContext.get().emailAccess().getMockMailListFor(emailAdress.get()); + List data = IntegrationTestContext.get().emailAccess().getMockMailListFor(emailAddress.get()); for (MockEmailEntry entry : data) { outputAsTextOnSuccess(entry.fullToString()); } diff --git a/sechub-developertools/src/main/java/com/mercedesbenz/sechub/developertools/admin/ui/action/project/CreateOverviewCSVExportAction.java b/sechub-developertools/src/main/java/com/mercedesbenz/sechub/developertools/admin/ui/action/project/CreateOverviewCSVExportAction.java index ccd9ec37df..899f146bef 100644 --- a/sechub-developertools/src/main/java/com/mercedesbenz/sechub/developertools/admin/ui/action/project/CreateOverviewCSVExportAction.java +++ b/sechub-developertools/src/main/java/com/mercedesbenz/sechub/developertools/admin/ui/action/project/CreateOverviewCSVExportAction.java @@ -114,10 +114,10 @@ private List loadSignupUserIds() { while (iditerator.hasNext()) { JsonNode dNode = iditerator.next(); String userId = dNode.get("userId").asText(); - String emailAdress = dNode.get("emailAdress").asText(); - ids.add(userId + " <" + emailAdress + ">"); + String emailAddress = dNode.get("emailAddress").asText(); + ids.add(userId + " <" + emailAddress + ">"); } - outputAsTextOnSuccess("Found " + ids.size() + " watting signups."); + outputAsTextOnSuccess("Found " + ids.size() + " waiting signups."); return ids; } diff --git a/sechub-developertools/src/main/java/com/mercedesbenz/sechub/developertools/admin/ui/action/user/AnonymousRequestNewAPITokenUserAction.java b/sechub-developertools/src/main/java/com/mercedesbenz/sechub/developertools/admin/ui/action/user/AnonymousRequestNewAPITokenUserAction.java index adf910d3d9..7413682f92 100644 --- a/sechub-developertools/src/main/java/com/mercedesbenz/sechub/developertools/admin/ui/action/user/AnonymousRequestNewAPITokenUserAction.java +++ b/sechub-developertools/src/main/java/com/mercedesbenz/sechub/developertools/admin/ui/action/user/AnonymousRequestNewAPITokenUserAction.java @@ -17,7 +17,7 @@ public AnonymousRequestNewAPITokenUserAction(UIContext context) { @Override public void execute(ActionEvent e) { - Optional email = getUserInput("Email of user requesting new API token", InputCacheIdentifier.EMAILADRESS); + Optional email = getUserInput("Email of user requesting new API token", InputCacheIdentifier.EMAILADDRESS); if (!email.isPresent()) { return; } diff --git a/sechub-developertools/src/main/java/com/mercedesbenz/sechub/developertools/admin/ui/action/user/AnonymousSigninNewUserAction.java b/sechub-developertools/src/main/java/com/mercedesbenz/sechub/developertools/admin/ui/action/user/AnonymousSigninNewUserAction.java index 6e569a9245..f01f6623f2 100644 --- a/sechub-developertools/src/main/java/com/mercedesbenz/sechub/developertools/admin/ui/action/user/AnonymousSigninNewUserAction.java +++ b/sechub-developertools/src/main/java/com/mercedesbenz/sechub/developertools/admin/ui/action/user/AnonymousSigninNewUserAction.java @@ -22,7 +22,7 @@ public void execute(ActionEvent e) { return; } - Optional email = getUserInput("Give Email of new user", InputCacheIdentifier.EMAILADRESS); + Optional email = getUserInput("Give Email of new user", InputCacheIdentifier.EMAILADDRESS); if (!email.isPresent()) { return; } diff --git a/sechub-developertools/src/main/java/com/mercedesbenz/sechub/developertools/admin/ui/action/user/ShowUserDetailForEmailAddressAction.java b/sechub-developertools/src/main/java/com/mercedesbenz/sechub/developertools/admin/ui/action/user/ShowUserDetailForEmailAddressAction.java index 08b7f8f9a1..86a9f2fe5d 100644 --- a/sechub-developertools/src/main/java/com/mercedesbenz/sechub/developertools/admin/ui/action/user/ShowUserDetailForEmailAddressAction.java +++ b/sechub-developertools/src/main/java/com/mercedesbenz/sechub/developertools/admin/ui/action/user/ShowUserDetailForEmailAddressAction.java @@ -17,7 +17,7 @@ public ShowUserDetailForEmailAddressAction(UIContext context) { @Override public void execute(ActionEvent e) { - Optional emailAddress = getUserInput("Please enter email address", InputCacheIdentifier.EMAILADRESS); + Optional emailAddress = getUserInput("Please enter email address", InputCacheIdentifier.EMAILADDRESS); if (!emailAddress.isPresent()) { return; } diff --git a/sechub-developertools/src/main/java/com/mercedesbenz/sechub/developertools/admin/ui/cache/InputCache.java b/sechub-developertools/src/main/java/com/mercedesbenz/sechub/developertools/admin/ui/cache/InputCache.java index d63fe0addc..5e76ce830b 100644 --- a/sechub-developertools/src/main/java/com/mercedesbenz/sechub/developertools/admin/ui/cache/InputCache.java +++ b/sechub-developertools/src/main/java/com/mercedesbenz/sechub/developertools/admin/ui/cache/InputCache.java @@ -47,7 +47,7 @@ private void createDefaults() { set(InputCacheIdentifier.PDS_SECHUB_JOBUUID, UUID.randomUUID().toString()); set(InputCacheIdentifier.PDS_PRODUCT_ID, "PDS_INTTEST_PRODUCT_CODESCAN"); - set(InputCacheIdentifier.EMAILADRESS, "sechub@example.org"); + set(InputCacheIdentifier.EMAILADDRESS, "sechub@example.org"); set(InputCacheIdentifier.PROJECT_MOCK_CONFIG_JSON, "{ \n" + " \"apiVersion\" : \"1.0\",\n" + "\n" + " \"codeScan\" : {\n" + " \"result\" : \"yellow\" \n" + " },\n" + " \"webScan\" : {\n" + " \"result\" : \"green\" \n" + " },\n" + " \"infraScan\" : {\n" diff --git a/sechub-developertools/src/main/java/com/mercedesbenz/sechub/developertools/admin/ui/cache/InputCacheIdentifier.java b/sechub-developertools/src/main/java/com/mercedesbenz/sechub/developertools/admin/ui/cache/InputCacheIdentifier.java index cc6d05e87e..e6a9238208 100644 --- a/sechub-developertools/src/main/java/com/mercedesbenz/sechub/developertools/admin/ui/cache/InputCacheIdentifier.java +++ b/sechub-developertools/src/main/java/com/mercedesbenz/sechub/developertools/admin/ui/cache/InputCacheIdentifier.java @@ -6,7 +6,7 @@ public enum InputCacheIdentifier { USERNAME, - EMAILADRESS, + EMAILADDRESS, WHITELIST_URI, diff --git a/sechub-doc/src/docs/asciidoc/documents/code2doc/usecases/user/request_new_api_token_description.adoc b/sechub-doc/src/docs/asciidoc/documents/code2doc/usecases/user/request_new_api_token_description.adoc index 2bda0b648f..b4747a1971 100644 --- a/sechub-doc/src/docs/asciidoc/documents/code2doc/usecases/user/request_new_api_token_description.adoc +++ b/sechub-doc/src/docs/asciidoc/documents/code2doc/usecases/user/request_new_api_token_description.adoc @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT [[sechub-doclink-uc-user-requests-new-apittoken]] It shall be possible to achieve this by calling REST API and also by just visiting -static sechub website and entering mail adress and post request by simple web form. +static sechub website and entering email address and post request by simple web form. When user exists a new one time token will be created and sent to user per email - so same way as done when a new user signup is accepted by admin. diff --git a/sechub-doc/src/docs/asciidoc/documents/techdoc/03_coding_conventions.adoc b/sechub-doc/src/docs/asciidoc/documents/techdoc/03_coding_conventions.adoc index 13244ab720..de478df7ac 100644 --- a/sechub-doc/src/docs/asciidoc/documents/techdoc/03_coding_conventions.adoc +++ b/sechub-doc/src/docs/asciidoc/documents/techdoc/03_coding_conventions.adoc @@ -24,7 +24,7 @@ Please make sure that the SQL statements work with both of them. * We are using PostgreSQL which does automatically use lower_case names * Numbering starts at `01`; maximum is `99` * Naming scheme for constraints: `c__` + - Example: `c01_adm_user_emailadress` + Example: `c01_adm_user_emailaddress` * Naming scheme for indices: `i_
_` + Example: `i01_statistic_job_run_data_filter` diff --git a/sechub-doc/src/test/java/com/mercedesbenz/sechub/restdoc/AnonymousSignupRestControllerRestDocTest.java b/sechub-doc/src/test/java/com/mercedesbenz/sechub/restdoc/AnonymousSignupRestControllerRestDocTest.java index 03dba165fc..7d4b7ea5a5 100644 --- a/sechub-doc/src/test/java/com/mercedesbenz/sechub/restdoc/AnonymousSignupRestControllerRestDocTest.java +++ b/sechub-doc/src/test/java/com/mercedesbenz/sechub/restdoc/AnonymousSignupRestControllerRestDocTest.java @@ -69,7 +69,7 @@ public void calling_with_api_1_0_and_valid_userid_and_email_returns_HTTP_200() t this.mockMvc.perform( post(apiEndpoint). contentType(MediaType.APPLICATION_JSON_VALUE). - content("{\"apiVersion\":\"1.0\",\"userId\":\"valid_userid\",\"emailAdress\":\"valid_mailadress@test.com\"}") + content("{\"apiVersion\":\"1.0\",\"userId\":\"valid_userid\",\"emailAddress\":\"valid_mailaddress@test.com\"}") )./*andDo(print()).*/ andExpect(status().isOk()). andDo(defineRestService(). @@ -84,7 +84,7 @@ public void calling_with_api_1_0_and_valid_userid_and_email_returns_HTTP_200() t requestFields( fieldWithPath("apiVersion").description("The api version, currently only 1.0 is supported"), fieldWithPath("userId").description("Wanted userid, the userid must be lowercase only!"), - fieldWithPath("emailAdress").description("Email adress") + fieldWithPath("emailAddress").description("Email address") ) ) diff --git a/sechub-doc/src/test/java/com/mercedesbenz/sechub/restdoc/AnonymousUserRequestsNewApiTokenRestDocTest.java b/sechub-doc/src/test/java/com/mercedesbenz/sechub/restdoc/AnonymousUserRequestsNewApiTokenRestDocTest.java index dd2d5ad534..4423c99b07 100644 --- a/sechub-doc/src/test/java/com/mercedesbenz/sechub/restdoc/AnonymousUserRequestsNewApiTokenRestDocTest.java +++ b/sechub-doc/src/test/java/com/mercedesbenz/sechub/restdoc/AnonymousUserRequestsNewApiTokenRestDocTest.java @@ -64,7 +64,7 @@ public void calling_with_api_1_0_and_valid_userid_and_email_returns_HTTP_200() t /* execute */ /* @formatter:off */ this.mockMvc.perform( - post(apiEndpoint,"emailAdress@test.com"). + post(apiEndpoint,"emailAddress@example.com"). contentType(MediaType.APPLICATION_JSON_VALUE) ). andExpect(status().isOk()). diff --git a/sechub-doc/src/test/java/com/mercedesbenz/sechub/restdoc/SignupAdministrationRestControllerRestDocTest.java b/sechub-doc/src/test/java/com/mercedesbenz/sechub/restdoc/SignupAdministrationRestControllerRestDocTest.java index bc8f25c7fa..9b646168ad 100644 --- a/sechub-doc/src/test/java/com/mercedesbenz/sechub/restdoc/SignupAdministrationRestControllerRestDocTest.java +++ b/sechub-doc/src/test/java/com/mercedesbenz/sechub/restdoc/SignupAdministrationRestControllerRestDocTest.java @@ -78,11 +78,11 @@ public void restdoc_list_user_signups() throws Exception { Class useCase = UseCaseAdminListsOpenUserSignups.class; Signup signup1 = new Signup(); - signup1.setEmailAdress("john.smith@example.com"); + signup1.setEmailAddress("john.smith@example.com"); signup1.setUserId("johnsmith"); Signup signup2 = new Signup(); - signup2.setEmailAdress("jane.smith@example.com"); + signup2.setEmailAddress("jane.smith@example.com"); signup2.setUserId("janesmith"); List signupList = new ArrayList<>(); @@ -97,7 +97,7 @@ public void restdoc_list_user_signups() throws Exception { header(AuthenticationHelper.HEADER_NAME, AuthenticationHelper.getHeaderValue()) ). andExpect(status().isOk()). - andExpect(content().json("[{\"userId\":\"johnsmith\",\"emailAdress\":\"john.smith@example.com\"},{\"userId\":\"janesmith\",\"emailAdress\":\"jane.smith@example.com\"}]")). + andExpect(content().json("[{\"userId\":\"johnsmith\",\"emailAddress\":\"john.smith@example.com\"},{\"userId\":\"janesmith\",\"emailAddress\":\"jane.smith@example.com\"}]")). andDo(defineRestService(). with(). useCaseData(useCase). @@ -111,7 +111,7 @@ public void restdoc_list_user_signups() throws Exception { responseFields( fieldWithPath("[]").description("List of user signups").optional(), fieldWithPath("[]."+RestDocPathParameter.USER_ID.paramName()).type(JsonFieldType.STRING).description("The user id"), - fieldWithPath("[].emailAdress").type(JsonFieldType.STRING).description("The email address") + fieldWithPath("[].emailAddress").type(JsonFieldType.STRING).description("The email address") ) ) ); diff --git a/sechub-doc/src/test/java/com/mercedesbenz/sechub/restdoc/UserAdministrationRestControllerRestDocTest.java b/sechub-doc/src/test/java/com/mercedesbenz/sechub/restdoc/UserAdministrationRestControllerRestDocTest.java index 8002437b2c..5cdfb5f552 100644 --- a/sechub-doc/src/test/java/com/mercedesbenz/sechub/restdoc/UserAdministrationRestControllerRestDocTest.java +++ b/sechub-doc/src/test/java/com/mercedesbenz/sechub/restdoc/UserAdministrationRestControllerRestDocTest.java @@ -127,7 +127,7 @@ public void restdoc_admin_updates_user_email_address() throws Exception { ), pathParameters( - parameterWithName(USER_ID.paramName()).description("The userId of the user whose email adress will be changed"), + parameterWithName(USER_ID.paramName()).description("The userId of the user whose email address will be changed"), parameterWithName(EMAIL_ADDRESS.paramName()).description("The new email address") ) @@ -336,7 +336,7 @@ public void restdoc_show_user_details() throws Exception { User user = mock(User.class); when(user.getName()).thenReturn("user1"); - when(user.getEmailAdress()).thenReturn("user1@example.org"); + when(user.getEmailAddress()).thenReturn("user1@example.org"); Set projects = new LinkedHashSet<>(); Project project1 = mock(Project.class); @@ -368,7 +368,7 @@ public void restdoc_show_user_details() throws Exception { ), responseFields( fieldWithPath(UserDetailInformation.PROPERTY_USERNAME).description("The name of the user"), - fieldWithPath(UserDetailInformation.PROPERTY_EMAIL).description("The mail adress of the user"), + fieldWithPath(UserDetailInformation.PROPERTY_EMAIL).description("The email address of the user"), fieldWithPath(UserDetailInformation.PROPERTY_SUPERADMIN).description("True, when this user is a super administrator"), fieldWithPath(UserDetailInformation.PROPERTY_PROJECTS).description("The projects the user has access to"), fieldWithPath(UserDetailInformation.PROPERTY_OWNED_PROJECTS).description("The projects the user is owner of") @@ -392,7 +392,7 @@ public void restdoc_show_user_details_for_email_address() throws Exception { User user = mock(User.class); when(user.getName()).thenReturn(userId); - when(user.getEmailAdress()).thenReturn(emailAddress); + when(user.getEmailAddress()).thenReturn(emailAddress); Set projects = new LinkedHashSet<>(); Project project1 = mock(Project.class); @@ -424,7 +424,7 @@ public void restdoc_show_user_details_for_email_address() throws Exception { ), responseFields( fieldWithPath(UserDetailInformation.PROPERTY_USERNAME).description("The name of the user"), - fieldWithPath(UserDetailInformation.PROPERTY_EMAIL).description("The mail adress of the user"), + fieldWithPath(UserDetailInformation.PROPERTY_EMAIL).description("The mail address of the user"), fieldWithPath(UserDetailInformation.PROPERTY_SUPERADMIN).description("True, when this user is a super administrator"), fieldWithPath(UserDetailInformation.PROPERTY_PROJECTS).description("The projects the user has access to"), fieldWithPath(UserDetailInformation.PROPERTY_OWNED_PROJECTS).description("The projects the user is owner of") diff --git a/sechub-examples/example-sechub-api-java/src/main/java/com/mercedesbenz/sechub/api/java/demo/playground/AdminApiPlayground.java b/sechub-examples/example-sechub-api-java/src/main/java/com/mercedesbenz/sechub/api/java/demo/playground/AdminApiPlayground.java index 55810bec67..7b7fb30272 100644 --- a/sechub-examples/example-sechub-api-java/src/main/java/com/mercedesbenz/sechub/api/java/demo/playground/AdminApiPlayground.java +++ b/sechub-examples/example-sechub-api-java/src/main/java/com/mercedesbenz/sechub/api/java/demo/playground/AdminApiPlayground.java @@ -148,7 +148,7 @@ private void signupNewUser() throws SecHubClientException { UserSignup signUp = new UserSignup(); signUp.setApiVersion("1.0"); - signUp.setEmailAdress(userName + "@example.com"); + signUp.setEmailAddress(userName + "@example.com"); signUp.setUserId(userName); client.createSignup(signUp); diff --git a/sechub-integrationtest/src/main/java/com/mercedesbenz/sechub/integrationtest/api/AsUser.java b/sechub-integrationtest/src/main/java/com/mercedesbenz/sechub/integrationtest/api/AsUser.java index 4e12ab44f9..177680a9e7 100644 --- a/sechub-integrationtest/src/main/java/com/mercedesbenz/sechub/integrationtest/api/AsUser.java +++ b/sechub-integrationtest/src/main/java/com/mercedesbenz/sechub/integrationtest/api/AsUser.java @@ -167,7 +167,7 @@ private TestRestHelper getRestHelper() { */ public AsUser signUpAs(TestUser user) { - String json = "{\"apiVersion\":\"1.0\",\r\n" + " \"userId\":\"" + user.getUserId() + "\",\r\n" + " \"emailAdress\":\"" + user.getEmail() + String json = "{\"apiVersion\":\"1.0\",\r\n" + " \"userId\":\"" + user.getUserId() + "\",\r\n" + " \"emailAddress\":\"" + user.getEmail() + "\"}"; getRestHelper().postJson(getUrlBuilder().buildUserSignUpUrl(), json); return this; diff --git a/sechub-integrationtest/src/main/java/com/mercedesbenz/sechub/integrationtest/api/TestAPI.java b/sechub-integrationtest/src/main/java/com/mercedesbenz/sechub/integrationtest/api/TestAPI.java index 77cd98cbc1..49f71af73d 100644 --- a/sechub-integrationtest/src/main/java/com/mercedesbenz/sechub/integrationtest/api/TestAPI.java +++ b/sechub-integrationtest/src/main/java/com/mercedesbenz/sechub/integrationtest/api/TestAPI.java @@ -1079,7 +1079,7 @@ public static SortedMap listSignups() { @Override public void accept(JsonNode node) { JsonNode userAsKey = node.get("userId"); - JsonNode emailAsValue = node.get("emailAdress"); + JsonNode emailAsValue = node.get("emailAddress"); String keyText = userAsKey.textValue(); String valueText = emailAsValue.textValue(); map.put(keyText, valueText); diff --git a/sechub-integrationtest/src/test/java/com/mercedesbenz/sechub/integrationtest/scenario2/UserAdministrationScenario2IntTest.java b/sechub-integrationtest/src/test/java/com/mercedesbenz/sechub/integrationtest/scenario2/UserAdministrationScenario2IntTest.java index 7197069696..0ef0b4c776 100644 --- a/sechub-integrationtest/src/test/java/com/mercedesbenz/sechub/integrationtest/scenario2/UserAdministrationScenario2IntTest.java +++ b/sechub-integrationtest/src/test/java/com/mercedesbenz/sechub/integrationtest/scenario2/UserAdministrationScenario2IntTest.java @@ -53,7 +53,7 @@ public void superadmin_can_fetch_user_list_and_list_contains_user1_and_user2() { } @Test - public void superadmin_can_change_user_email_adress_of_user2() { + public void superadmin_can_change_user_email_address_of_user2() { /* prepare */ TestUserDetailInformation details = as(SUPER_ADMIN).fetchUserDetails(USER_2); String formerEmailAddress = details.getEmail(); diff --git a/sechub-integrationtest/src/test/java/com/mercedesbenz/sechub/integrationtest/scenario2/UserRequestsNewAPITokenIntTest.java b/sechub-integrationtest/src/test/java/com/mercedesbenz/sechub/integrationtest/scenario2/UserRequestsNewAPITokenIntTest.java index 9544f6768f..42fa607ba2 100644 --- a/sechub-integrationtest/src/test/java/com/mercedesbenz/sechub/integrationtest/scenario2/UserRequestsNewAPITokenIntTest.java +++ b/sechub-integrationtest/src/test/java/com/mercedesbenz/sechub/integrationtest/scenario2/UserRequestsNewAPITokenIntTest.java @@ -16,7 +16,7 @@ public class UserRequestsNewAPITokenIntTest { public IntegrationTestSetup setup = IntegrationTestSetup.forScenario(Scenario2.class); @Test - public void an_anonymous_user_can_trigger_new_api_token_request_for_existing_user_email_adress_leads_to_mail_with_link_to_fetch_new_apitoken() { + public void an_anonymous_user_can_trigger_new_api_token_request_for_existing_user_email_address_leads_to_email_with_link_to_fetch_new_apitoken() { /* check preconditions */ String email = USER_1.getEmail(); assertTrue(email.endsWith("_user1@example.org")); diff --git a/sechub-notification/src/main/java/com/mercedesbenz/sechub/domain/notification/NotificationConfiguration.java b/sechub-notification/src/main/java/com/mercedesbenz/sechub/domain/notification/NotificationConfiguration.java index 8d97bf3f6f..73d850df00 100644 --- a/sechub-notification/src/main/java/com/mercedesbenz/sechub/domain/notification/NotificationConfiguration.java +++ b/sechub-notification/src/main/java/com/mercedesbenz/sechub/domain/notification/NotificationConfiguration.java @@ -15,15 +15,15 @@ @Component public class NotificationConfiguration { - @MustBeDocumented(value = "Single mail adress used for emails to administrators. This should an NPM (non personalized mailbox)") + @MustBeDocumented(value = "Single email address used for emails to administrators. This should be a NPM (non personalized mailbox)") @Value("${sechub.notification.email.administrators}") private String emailAdministrators; - @MustBeDocumented(value = "Adress used for emails sent by sechub system") + @MustBeDocumented(value = "Address used for emails sent by sechub system") @Value("${sechub.notification.email.from}") private String emailFrom; - @MustBeDocumented(value = "Adress used for reply when email was sent by sechub system") + @MustBeDocumented(value = "Address used for reply when email was sent by sechub system") @Value("${sechub.notification.email.replyto:}") private String emailReplyTo; diff --git a/sechub-notification/src/main/java/com/mercedesbenz/sechub/domain/notification/email/MockEmailRestController.java b/sechub-notification/src/main/java/com/mercedesbenz/sechub/domain/notification/email/MockEmailRestController.java index a2a14220cb..dff3fd3099 100644 --- a/sechub-notification/src/main/java/com/mercedesbenz/sechub/domain/notification/email/MockEmailRestController.java +++ b/sechub-notification/src/main/java/com/mercedesbenz/sechub/domain/notification/email/MockEmailRestController.java @@ -39,13 +39,13 @@ public class MockEmailRestController { /* @formatter:off */ @RequestMapping( - path = APIConstants.API_ANONYMOUS+"integrationtest/mock/emails/to/{emailAdress}", + path = APIConstants.API_ANONYMOUS+"integrationtest/mock/emails/to/{emailAddress}", method = RequestMethod.GET, produces= {MediaType.APPLICATION_JSON_VALUE}) @ResponseStatus(HttpStatus.OK) - public List getMailsFor(@PathVariable(name="emailAdress") String emailAdress) { + public List getMailsFor(@PathVariable(name="emailAddress") String emailAddress) { /* @formatter:on */ - return mockMailService.getMailsFor(emailAdress); + return mockMailService.getMailsFor(emailAddress); } /* @formatter:off */ diff --git a/sechub-notification/src/main/java/com/mercedesbenz/sechub/domain/notification/owner/InformThatProjectHasNewOwnerNotificationService.java b/sechub-notification/src/main/java/com/mercedesbenz/sechub/domain/notification/owner/InformThatProjectHasNewOwnerNotificationService.java index be348297c7..cf1a7342f8 100644 --- a/sechub-notification/src/main/java/com/mercedesbenz/sechub/domain/notification/owner/InformThatProjectHasNewOwnerNotificationService.java +++ b/sechub-notification/src/main/java/com/mercedesbenz/sechub/domain/notification/owner/InformThatProjectHasNewOwnerNotificationService.java @@ -44,7 +44,7 @@ public void notify(ProjectMessage projectMessage, String baseUrl) { return; } - Set ccMailsSet = projectMessage.getUserEmailAdresses(); + Set ccMailsSet = projectMessage.getUserEmailAddresses(); ccMailsSet.add(previousOwnerEmailAddress); String[] ccAddresses = ccMailsSet.stream().toArray(String[]::new); diff --git a/sechub-notification/src/main/java/com/mercedesbenz/sechub/domain/notification/superadmin/InformAdminsThatUserBecomesAdminNotificationService.java b/sechub-notification/src/main/java/com/mercedesbenz/sechub/domain/notification/superadmin/InformAdminsThatUserBecomesAdminNotificationService.java index c73616b837..ec7191c37b 100644 --- a/sechub-notification/src/main/java/com/mercedesbenz/sechub/domain/notification/superadmin/InformAdminsThatUserBecomesAdminNotificationService.java +++ b/sechub-notification/src/main/java/com/mercedesbenz/sechub/domain/notification/superadmin/InformAdminsThatUserBecomesAdminNotificationService.java @@ -40,7 +40,7 @@ private String createEmailContent(UserMessage userMessage, String baseUrl) { StringBuilder emailContent = new StringBuilder(); emailContent.append("Please welcome \n " + userMessage.getUserId() + "\n"); emailContent.append("as a new administrator of SecHub for environment (base url): " + baseUrl + "\n\n"); - emailContent.append("Email address of new colleague is: " + userMessage.getEmailAdress() + "\n"); + emailContent.append("Email address of new colleague is: " + userMessage.getEmailAddress() + "\n"); emailContent.append("Don't forget to add that email address to NPM (SecHub administrators) as well.\n"); String text = emailContent.toString(); diff --git a/sechub-notification/src/main/java/com/mercedesbenz/sechub/domain/notification/superadmin/InformAdminsThatUserNoLongerAdminNotificationService.java b/sechub-notification/src/main/java/com/mercedesbenz/sechub/domain/notification/superadmin/InformAdminsThatUserNoLongerAdminNotificationService.java index 719e38501e..f70f1d0b79 100644 --- a/sechub-notification/src/main/java/com/mercedesbenz/sechub/domain/notification/superadmin/InformAdminsThatUserNoLongerAdminNotificationService.java +++ b/sechub-notification/src/main/java/com/mercedesbenz/sechub/domain/notification/superadmin/InformAdminsThatUserNoLongerAdminNotificationService.java @@ -41,7 +41,7 @@ private String createEmailContent(UserMessage userMessage, String baseUrl) { StringBuilder emailContent = new StringBuilder(); emailContent.append("User " + userMessage.getUserId() + " left the group of SecHub administrators.\n"); emailContent.append("She/He will be no longer admin for environment (base url): " + baseUrl + "\n\n"); - emailContent.append("Email address of colleague was: " + userMessage.getEmailAdress() + "\n"); + emailContent.append("Email address of colleague was: " + userMessage.getEmailAddress() + "\n"); emailContent.append("Don't forget to remove that email address from NPM (SecHub administrators) as well.\n"); String text = emailContent.toString(); return text; diff --git a/sechub-notification/src/main/java/com/mercedesbenz/sechub/domain/notification/user/InformUserThatUserBecomesAdminNotificationService.java b/sechub-notification/src/main/java/com/mercedesbenz/sechub/domain/notification/user/InformUserThatUserBecomesAdminNotificationService.java index 3606d9bfd3..37b091dcbe 100644 --- a/sechub-notification/src/main/java/com/mercedesbenz/sechub/domain/notification/user/InformUserThatUserBecomesAdminNotificationService.java +++ b/sechub-notification/src/main/java/com/mercedesbenz/sechub/domain/notification/user/InformUserThatUserBecomesAdminNotificationService.java @@ -25,7 +25,7 @@ public void notify(UserMessage userMessage, String baseUrl) { SimpleMailMessage message = factory.createMessage("SecHub administrator privileges granted"); - message.setTo(userMessage.getEmailAdress()); + message.setTo(userMessage.getEmailAddress()); message.setText(createEmailContent(userMessage, baseUrl)); emailService.send(message); diff --git a/sechub-notification/src/main/java/com/mercedesbenz/sechub/domain/notification/user/InformUserThatUserNoLongerAdminNotificationService.java b/sechub-notification/src/main/java/com/mercedesbenz/sechub/domain/notification/user/InformUserThatUserNoLongerAdminNotificationService.java index 58f14f4cff..83a41f840d 100644 --- a/sechub-notification/src/main/java/com/mercedesbenz/sechub/domain/notification/user/InformUserThatUserNoLongerAdminNotificationService.java +++ b/sechub-notification/src/main/java/com/mercedesbenz/sechub/domain/notification/user/InformUserThatUserNoLongerAdminNotificationService.java @@ -25,7 +25,7 @@ public void notify(UserMessage userMessage, String baseUrl) { SimpleMailMessage message = factory.createMessage("SecHub administrator privileges revoked"); - message.setTo(userMessage.getEmailAdress()); + message.setTo(userMessage.getEmailAddress()); message.setText(createEmailContent(userMessage, baseUrl)); emailService.send(message); diff --git a/sechub-notification/src/main/java/com/mercedesbenz/sechub/domain/notification/user/InformUsersThatProjectHasBeenDeletedNotificationService.java b/sechub-notification/src/main/java/com/mercedesbenz/sechub/domain/notification/user/InformUsersThatProjectHasBeenDeletedNotificationService.java index 2926b16ad7..24d5d99a6a 100644 --- a/sechub-notification/src/main/java/com/mercedesbenz/sechub/domain/notification/user/InformUsersThatProjectHasBeenDeletedNotificationService.java +++ b/sechub-notification/src/main/java/com/mercedesbenz/sechub/domain/notification/user/InformUsersThatProjectHasBeenDeletedNotificationService.java @@ -32,9 +32,9 @@ public class InformUsersThatProjectHasBeenDeletedNotificationService { public void notify(ProjectMessage projectMessage, String baseUrl) { requireNonNull(projectMessage); - Set mailAdresses = projectMessage.getUserEmailAdresses(); - if (mailAdresses == null || mailAdresses.isEmpty()) { - LOG.info("No users found for project {} so ignore sending info mail about delete", projectMessage.getProjectId()); + Set emailAddresses = projectMessage.getUserEmailAddresses(); + if (emailAddresses == null || emailAddresses.isEmpty()) { + LOG.info("No users found for project {} so ignore sending info email about delete", projectMessage.getProjectId()); return; } SimpleMailMessage message = factory.createMessage("A SecHub project where you have been a user was deleted: " + projectMessage.getProjectId()); @@ -44,10 +44,10 @@ public void notify(ProjectMessage projectMessage, String baseUrl) { emailContent.append("has been deleted.\n\n"); emailContent.append("This means that all report data has been deleted, and thus sechub scans for this project are no longer accessible.\n"); - String[] userAdresses = projectMessage.getUserEmailAdresses().toArray(new String[mailAdresses.size()]); + String[] userAddresses = projectMessage.getUserEmailAddresses().toArray(new String[emailAddresses.size()]); - message.setBcc(userAdresses); // we do send per BCC so users do not get other email addresses. Maybe necessary - // because of data protection + message.setBcc(userAddresses); // we do send per BCC so users do not get other email addresses. Maybe necessary + // because of data protection message.setText(emailContent.toString()); emailService.send(message); diff --git a/sechub-notification/src/main/java/com/mercedesbenz/sechub/domain/notification/user/NewAPITokenAppliedUserNotificationService.java b/sechub-notification/src/main/java/com/mercedesbenz/sechub/domain/notification/user/NewAPITokenAppliedUserNotificationService.java index d3fe6fd5e6..e9e2765216 100644 --- a/sechub-notification/src/main/java/com/mercedesbenz/sechub/domain/notification/user/NewAPITokenAppliedUserNotificationService.java +++ b/sechub-notification/src/main/java/com/mercedesbenz/sechub/domain/notification/user/NewAPITokenAppliedUserNotificationService.java @@ -30,7 +30,7 @@ public void notify(UserMessage userMessage) { emailContent.append("If you have not triggered an api token change please inform administrators.\n"); SimpleMailMessage message1 = factory.createMessage("SecHub API token changed"); - message1.setTo(userMessage.getEmailAdress()); + message1.setTo(userMessage.getEmailAddress()); message1.setText(emailContent.toString()); emailService.send(message1); diff --git a/sechub-notification/src/main/java/com/mercedesbenz/sechub/domain/notification/user/NewApiTokenRequestedUserNotificationService.java b/sechub-notification/src/main/java/com/mercedesbenz/sechub/domain/notification/user/NewApiTokenRequestedUserNotificationService.java index 54d1ef4d5f..c256a46386 100644 --- a/sechub-notification/src/main/java/com/mercedesbenz/sechub/domain/notification/user/NewApiTokenRequestedUserNotificationService.java +++ b/sechub-notification/src/main/java/com/mercedesbenz/sechub/domain/notification/user/NewApiTokenRequestedUserNotificationService.java @@ -44,7 +44,7 @@ public void notify(UserMessage userMessage) { emailContent.append("\n"); SimpleMailMessage message1 = factory.createMessage(userMessage.getSubject()); - message1.setTo(userMessage.getEmailAdress()); + message1.setTo(userMessage.getEmailAddress()); message1.setText(emailContent.toString()); emailService.send(message1); diff --git a/sechub-notification/src/main/java/com/mercedesbenz/sechub/domain/notification/user/SignUpRequestedAdminNotificationService.java b/sechub-notification/src/main/java/com/mercedesbenz/sechub/domain/notification/user/SignUpRequestedAdminNotificationService.java index 3ff474464f..31e221d71a 100644 --- a/sechub-notification/src/main/java/com/mercedesbenz/sechub/domain/notification/user/SignUpRequestedAdminNotificationService.java +++ b/sechub-notification/src/main/java/com/mercedesbenz/sechub/domain/notification/user/SignUpRequestedAdminNotificationService.java @@ -32,7 +32,7 @@ public void notify(UserMessage userMessage) { emailContent.append("A user requested access to SecHub:\n"); emailContent.append("- Requested user id: " + userMessage.getUserId() + "\n"); - emailContent.append("- Email address: " + userMessage.getEmailAdress() + "\n"); + emailContent.append("- Email address: " + userMessage.getEmailAddress() + "\n"); /* send mail */ SimpleMailMessage message1 = factory.createMessage("SecHub signup requested: " + userMessage.getUserId()); diff --git a/sechub-notification/src/main/java/com/mercedesbenz/sechub/domain/notification/user/SignUpRequestedUserNotificationService.java b/sechub-notification/src/main/java/com/mercedesbenz/sechub/domain/notification/user/SignUpRequestedUserNotificationService.java index 357c6d81a6..3bec9e6ac3 100644 --- a/sechub-notification/src/main/java/com/mercedesbenz/sechub/domain/notification/user/SignUpRequestedUserNotificationService.java +++ b/sechub-notification/src/main/java/com/mercedesbenz/sechub/domain/notification/user/SignUpRequestedUserNotificationService.java @@ -31,7 +31,7 @@ public void notify(UserMessage userMessage) { /* send mail */ SimpleMailMessage message1 = factory.createMessage("Successful registration in SecHub"); - message1.setTo(userMessage.getEmailAdress()); + message1.setTo(userMessage.getEmailAddress()); message1.setText(emailContent.toString()); emailService.send(message1); diff --git a/sechub-notification/src/main/java/com/mercedesbenz/sechub/domain/notification/user/UserDeletedNotificationService.java b/sechub-notification/src/main/java/com/mercedesbenz/sechub/domain/notification/user/UserDeletedNotificationService.java index deadd90b56..722b2620bc 100644 --- a/sechub-notification/src/main/java/com/mercedesbenz/sechub/domain/notification/user/UserDeletedNotificationService.java +++ b/sechub-notification/src/main/java/com/mercedesbenz/sechub/domain/notification/user/UserDeletedNotificationService.java @@ -32,7 +32,7 @@ public void notify(UserMessage userMessage) { emailContent.append("\nhas been removed by an administrator.\n"); SimpleMailMessage message = factory.createMessage("SecHub account removed"); - message.setTo(userMessage.getEmailAdress()); + message.setTo(userMessage.getEmailAddress()); message.setText(emailContent.toString()); emailService.send(message); diff --git a/sechub-notification/src/main/java/com/mercedesbenz/sechub/domain/notification/user/UserEmailAddressChangedNotificationService.java b/sechub-notification/src/main/java/com/mercedesbenz/sechub/domain/notification/user/UserEmailAddressChangedNotificationService.java index a0a2f9ae4b..abe62a0831 100644 --- a/sechub-notification/src/main/java/com/mercedesbenz/sechub/domain/notification/user/UserEmailAddressChangedNotificationService.java +++ b/sechub-notification/src/main/java/com/mercedesbenz/sechub/domain/notification/user/UserEmailAddressChangedNotificationService.java @@ -50,11 +50,11 @@ private void sendEmailToNewUserEmailAddress(UserMessage userMessage) { emailContent.append(" from "); emailContent.append(userMessage.getFormerEmailAddress()); emailContent.append(" to "); - emailContent.append(userMessage.getEmailAdress()); + emailContent.append(userMessage.getEmailAddress()); emailContent.append(". \nYour old email address is not used in SecHub any longer."); SimpleMailMessage message = factory.createMessage(EMAIL_SUBJECT_NEW_ADDRESS); - message.setTo(userMessage.getEmailAdress()); + message.setTo(userMessage.getEmailAddress()); message.setText(emailContent.toString()); emailService.send(message); diff --git a/sechub-notification/src/test/java/com/mercedesbenz/sechub/domain/notification/owner/InformThatProjectHasNewOwnerNotificationServiceTest.java b/sechub-notification/src/test/java/com/mercedesbenz/sechub/domain/notification/owner/InformThatProjectHasNewOwnerNotificationServiceTest.java index b9b7439d4b..505226e5cf 100644 --- a/sechub-notification/src/test/java/com/mercedesbenz/sechub/domain/notification/owner/InformThatProjectHasNewOwnerNotificationServiceTest.java +++ b/sechub-notification/src/test/java/com/mercedesbenz/sechub/domain/notification/owner/InformThatProjectHasNewOwnerNotificationServiceTest.java @@ -59,7 +59,7 @@ public void sends_email_to_former_project_owner_new_project_owner_and_users_cont Set userMails = new HashSet<>(); userMails.add("user1@example.org"); - when(message.getUserEmailAdresses()).thenReturn(userMails); + when(message.getUserEmailAddresses()).thenReturn(userMails); /* execute */ serviceToTest.notify(message, "base1"); diff --git a/sechub-notification/src/test/java/com/mercedesbenz/sechub/domain/notification/user/InformUsersThatProjectHasBeenDeletedNotificationServiceTest.java b/sechub-notification/src/test/java/com/mercedesbenz/sechub/domain/notification/user/InformUsersThatProjectHasBeenDeletedNotificationServiceTest.java index 086024817e..8f9873ba33 100644 --- a/sechub-notification/src/test/java/com/mercedesbenz/sechub/domain/notification/user/InformUsersThatProjectHasBeenDeletedNotificationServiceTest.java +++ b/sechub-notification/src/test/java/com/mercedesbenz/sechub/domain/notification/user/InformUsersThatProjectHasBeenDeletedNotificationServiceTest.java @@ -45,7 +45,7 @@ public void sends_NO_email_when_no_users_where_defined_at_a_project() throws Exc when(message.getProjectId()).thenReturn("projectId1"); Set emptyUserList = new LinkedHashSet<>(); - when(message.getUserEmailAdresses()).thenReturn(emptyUserList); + when(message.getUserEmailAddresses()).thenReturn(emptyUserList); /* execute */ serviceToTest.notify(message, "base1"); @@ -69,7 +69,7 @@ public void sends_email_to_all_former_project_users_as_bcc_containing_projectid( userList.add("test1@example.org"); userList.add("test2@example.org"); - when(message.getUserEmailAdresses()).thenReturn(userList); + when(message.getUserEmailAddresses()).thenReturn(userList); /* execute */ serviceToTest.notify(message, "base1"); diff --git a/sechub-notification/src/test/java/com/mercedesbenz/sechub/domain/notification/user/SignUpRequestedAdminNotificationServiceTest.java b/sechub-notification/src/test/java/com/mercedesbenz/sechub/domain/notification/user/SignUpRequestedAdminNotificationServiceTest.java index f7fced5c86..791e4f6fde 100644 --- a/sechub-notification/src/test/java/com/mercedesbenz/sechub/domain/notification/user/SignUpRequestedAdminNotificationServiceTest.java +++ b/sechub-notification/src/test/java/com/mercedesbenz/sechub/domain/notification/user/SignUpRequestedAdminNotificationServiceTest.java @@ -46,7 +46,7 @@ public void sends_email_to_admins_containing_userid_and_email_from_event() throw // message to receive from event bus UserMessage message = mock(UserMessage.class); when(message.getUserId()).thenReturn("schlaubi"); - when(message.getEmailAdress()).thenReturn("schlau.schlumpf@schlumpfhausen.de"); + when(message.getEmailAddress()).thenReturn("schlau.schlumpf@schlumpfhausen.de"); /* execute */ serviceToTest.notify(message); diff --git a/sechub-notification/src/test/java/com/mercedesbenz/sechub/domain/notification/user/SignUpRequestedUserNotificationServiceTest.java b/sechub-notification/src/test/java/com/mercedesbenz/sechub/domain/notification/user/SignUpRequestedUserNotificationServiceTest.java index 4e56f4f2ed..92d0bd929b 100644 --- a/sechub-notification/src/test/java/com/mercedesbenz/sechub/domain/notification/user/SignUpRequestedUserNotificationServiceTest.java +++ b/sechub-notification/src/test/java/com/mercedesbenz/sechub/domain/notification/user/SignUpRequestedUserNotificationServiceTest.java @@ -40,7 +40,7 @@ public void sends_email_to_user_from_event() throws Exception { // message to receive from event bus UserMessage message = mock(UserMessage.class); - when(message.getEmailAdress()).thenReturn("schlau.schlumpf@schlumpfhausen.de"); + when(message.getEmailAddress()).thenReturn("schlau.schlumpf@schlumpfhausen.de"); /* execute */ serviceToTest.notify(message); diff --git a/sechub-notification/src/test/java/com/mercedesbenz/sechub/domain/notification/user/UserEmailAddressChangedNotificationServiceTest.java b/sechub-notification/src/test/java/com/mercedesbenz/sechub/domain/notification/user/UserEmailAddressChangedNotificationServiceTest.java index 6e666efc42..474672570d 100644 --- a/sechub-notification/src/test/java/com/mercedesbenz/sechub/domain/notification/user/UserEmailAddressChangedNotificationServiceTest.java +++ b/sechub-notification/src/test/java/com/mercedesbenz/sechub/domain/notification/user/UserEmailAddressChangedNotificationServiceTest.java @@ -35,13 +35,13 @@ void beforeEach() { @Test void sends_emails_to_former_and_new_mail_address_containing_expected_content() { /* prepare */ - String emailAddress = "email.adress@example.org"; - String formerEmailAddress = "former_email.adress@example.org"; + String emailAddress = "email.address@example.org"; + String formerEmailAddress = "former_email.address@example.org"; UserMessage userMessage = new UserMessage(); - userMessage.setEmailAdress(emailAddress); + userMessage.setEmailAddress(emailAddress); userMessage.setFormerEmailAddress(formerEmailAddress); - userMessage.setSubject("Your mail adress has changed by a test"); + userMessage.setSubject("Your email address has been changed by a test"); SimpleMailMessage simpleMailmessageFormer = new SimpleMailMessage(); simpleMailmessageFormer.setSubject(""); @@ -68,18 +68,18 @@ void sends_emails_to_former_and_new_mail_address_containing_expected_content() { String receivedFormerText = mails.receivedFormer.getText(); String receivedNewText = mails.receivedNew.getText(); - assertEquals("Your mail adress has changed by a test and it will not be used any longer for SecHub.\n" + assertEquals("Your email address has been changed by a test and it will not be used any longer for SecHub.\n" + "\n" + "In case you do not receive a follow up notification to the new email address, please inform your SecHub administrator!", receivedFormerText); - assertEquals("Your mail adress has changed by a test from former_email.adress@example.org to email.adress@example.org. \n" + assertEquals("Your email address has been changed by a test from former_email.address@example.org to email.address@example.org. \n" + "Your old email address is not used in SecHub any longer.", receivedNewText); /* @formatter:on */ } - private Mails fetchSentMailsFromMockObjects(String emailAdress, String formerEmailAdress) { + private Mails fetchSentMailsFromMockObjects(String emailAddress, String formerEmailAddress) { ArgumentCaptor messageCaptor = ArgumentCaptor.forClass(SimpleMailMessage.class); verify(emailService, times(2)).send(messageCaptor.capture()); List messagesSent = messageCaptor.getAllValues(); @@ -87,10 +87,10 @@ private Mails fetchSentMailsFromMockObjects(String emailAdress, String formerEma assertEquals(2, messagesSent.size()); Mails data = new Mails(); for (SimpleMailMessage message : messagesSent) { - if (emailAdress.equals(message.getTo()[0])) { + if (emailAddress.equals(message.getTo()[0])) { data.receivedNew = message; } - if (formerEmailAdress.equals(message.getTo()[0])) { + if (formerEmailAddress.equals(message.getTo()[0])) { data.receivedFormer = message; } } diff --git a/sechub-scan/src/main/java/com/mercedesbenz/sechub/domain/scan/InfraScanNetworkLocationProvider.java b/sechub-scan/src/main/java/com/mercedesbenz/sechub/domain/scan/InfraScanNetworkLocationProvider.java index 5dc4941e34..2fc7220450 100644 --- a/sechub-scan/src/main/java/com/mercedesbenz/sechub/domain/scan/InfraScanNetworkLocationProvider.java +++ b/sechub-scan/src/main/java/com/mercedesbenz/sechub/domain/scan/InfraScanNetworkLocationProvider.java @@ -35,7 +35,7 @@ public List getURIs() { } @Override - public List getInetAdresses() { + public List getInetAddresses() { if (config == null) { return Collections.emptyList(); } diff --git a/sechub-scan/src/main/java/com/mercedesbenz/sechub/domain/scan/NetworkLocationProvider.java b/sechub-scan/src/main/java/com/mercedesbenz/sechub/domain/scan/NetworkLocationProvider.java index 77d2b3605f..3bdb77d542 100644 --- a/sechub-scan/src/main/java/com/mercedesbenz/sechub/domain/scan/NetworkLocationProvider.java +++ b/sechub-scan/src/main/java/com/mercedesbenz/sechub/domain/scan/NetworkLocationProvider.java @@ -9,6 +9,6 @@ public interface NetworkLocationProvider { List getURIs(); - List getInetAdresses(); + List getInetAddresses(); } diff --git a/sechub-scan/src/main/java/com/mercedesbenz/sechub/domain/scan/NetworkTargetInfoFactory.java b/sechub-scan/src/main/java/com/mercedesbenz/sechub/domain/scan/NetworkTargetInfoFactory.java index 3615ec7854..aed69432a6 100644 --- a/sechub-scan/src/main/java/com/mercedesbenz/sechub/domain/scan/NetworkTargetInfoFactory.java +++ b/sechub-scan/src/main/java/com/mercedesbenz/sechub/domain/scan/NetworkTargetInfoFactory.java @@ -34,7 +34,7 @@ public NetworkTargetInfo createInfo(NetworkTargetType targetType, UUIDTraceLogID List uris = networkLocationProvider.getURIs(); registerURIs(traceLogId, support, registry, uris); - List inetAdresses = networkLocationProvider.getInetAdresses(); + List inetAdresses = networkLocationProvider.getInetAddresses(); registerInetAdresses(traceLogId, support, registry, inetAdresses); } else { diff --git a/sechub-scan/src/main/java/com/mercedesbenz/sechub/domain/scan/WebScanNetworkLocationProvider.java b/sechub-scan/src/main/java/com/mercedesbenz/sechub/domain/scan/WebScanNetworkLocationProvider.java index 4735169ec4..55bc0806cf 100644 --- a/sechub-scan/src/main/java/com/mercedesbenz/sechub/domain/scan/WebScanNetworkLocationProvider.java +++ b/sechub-scan/src/main/java/com/mercedesbenz/sechub/domain/scan/WebScanNetworkLocationProvider.java @@ -39,7 +39,7 @@ public List getURIs() { } @Override - public List getInetAdresses() { + public List getInetAddresses() { /* * SecHubWebScanConfiguration configuration currently has no IPs inside, so we * do not provide this diff --git a/sechub-sereco/src/test/resources/checkmarx/sechub-continous-integration-with-false-positive.xml b/sechub-sereco/src/test/resources/checkmarx/sechub-continous-integration-with-false-positive.xml index afea15b708..1079573c40 100644 --- a/sechub-sereco/src/test/resources/checkmarx/sechub-continous-integration-with-false-positive.xml +++ b/sechub-sereco/src/test/resources/checkmarx/sechub-continous-integration-with-false-positive.xml @@ -5776,13 +5776,13 @@ 34 106 1 - emailAdress + emailAddress 11 34 - public void anonymousRequestToGetNewApiTokenForUserMailAdress(@PathVariable(name="emailAddress") String emailAdress) { + public void anonymousRequestToGetNewApiTokenForUserMailAddress(@PathVariable(name="emailAddress") String emailAddress) { @@ -5791,13 +5791,13 @@ 36 72 2 - emailAdress + emailAddress 11 36 - newApiTokenService.anonymousRequestToGetNewApiTokenForUserMailAdress(emailAdress); + newApiTokenService.anonymousRequestToGetNewApiTokenForUserMailAddress(emailAddress); @@ -5812,7 +5812,7 @@ 39 - public void anonymousRequestToGetNewApiTokenForUserMailAdress(String userEmail) { + public void anonymousRequestToGetNewApiTokenForUserMailAddress(String userEmail) { @@ -5855,13 +5855,13 @@ 34 106 1 - emailAdress + emailAddress 11 34 - public void anonymousRequestToGetNewApiTokenForUserMailAdress(@PathVariable(name="emailAddress") String emailAdress) { + public void anonymousRequestToGetNewApiTokenForUserMailAddress(@PathVariable(name="emailAddress") String emailAddress) { @@ -5870,13 +5870,13 @@ 36 72 2 - emailAdress + emailAddress 11 36 - newApiTokenService.anonymousRequestToGetNewApiTokenForUserMailAdress(emailAdress); + newApiTokenService.anonymousRequestToGetNewApiTokenForUserMailAddress(emailAddress); @@ -5891,7 +5891,7 @@ 39 - public void anonymousRequestToGetNewApiTokenForUserMailAdress(String userEmail) { + public void anonymousRequestToGetNewApiTokenForUserMailAddress(String userEmail) { @@ -5906,7 +5906,7 @@ 41 - Optional<User> found = userRepository.findByEmailAdress(userEmail); + Optional<User> found = userRepository.findByemailAddress(userEmail); @@ -5915,13 +5915,13 @@ 41 58 5 - findByEmailAdress + findByemailAddress 1 41 - Optional<User> found = userRepository.findByEmailAdress(userEmail); + Optional<User> found = userRepository.findByemailAddress(userEmail); @@ -5936,7 +5936,7 @@ 41 - Optional<User> found = userRepository.findByEmailAdress(userEmail); + Optional<User> found = userRepository.findByemailAddress(userEmail); @@ -6308,7 +6308,7 @@ 82 - userId, emailAdress); + userId, emailAddress); @@ -7869,13 +7869,13 @@ 44 86 1 - emailAdress + emailAddress 11 44 - public List<SimpleMailMessage> getMailsFor(@PathVariable(name="emailAdress") String emailAdress) { + public List<SimpleMailMessage> getMailsFor(@PathVariable(name="emailAddress") String emailAddress) { @@ -7884,13 +7884,13 @@ 46 38 2 - emailAdress + emailAddress 11 46 - return mockMailService.getMailsFor(emailAdress); + return mockMailService.getMailsFor(emailAddress); @@ -7899,13 +7899,13 @@ 49 52 3 - emailAdress + emailAddress 11 49 - public List<SimpleMailMessage> getMailsFor(String emailAdress) { + public List<SimpleMailMessage> getMailsFor(String emailAddress) { @@ -7914,13 +7914,13 @@ 51 90 4 - emailAdress + emailAddress 11 51 - LOG.info("cache eimals is disabled, so returning empty mails list for emailAdress:{}",emailAdress); + LOG.info("cache eimals is disabled, so returning empty mails list for emailAddress:{}",emailAddress); @@ -7935,7 +7935,7 @@ 51 - LOG.info("cache eimals is disabled, so returning empty mails list for emailAdress:{}",emailAdress); + LOG.info("cache eimals is disabled, so returning empty mails list for emailAddress:{}",emailAddress); @@ -7948,13 +7948,13 @@ 44 86 1 - emailAdress + emailAddress 11 44 - public List<SimpleMailMessage> getMailsFor(@PathVariable(name="emailAdress") String emailAdress) { + public List<SimpleMailMessage> getMailsFor(@PathVariable(name="emailAddress") String emailAddress) { @@ -7963,13 +7963,13 @@ 46 38 2 - emailAdress + emailAddress 11 46 - return mockMailService.getMailsFor(emailAdress); + return mockMailService.getMailsFor(emailAddress); @@ -7978,13 +7978,13 @@ 49 52 3 - emailAdress + emailAddress 11 49 - public List<SimpleMailMessage> getMailsFor(String emailAdress) { + public List<SimpleMailMessage> getMailsFor(String emailAddress) { @@ -7993,13 +7993,13 @@ 54 27 4 - emailAdress + emailAddress 11 54 - return getMailsInternal(emailAdress); + return getMailsInternal(emailAddress); @@ -8008,13 +8008,13 @@ 57 58 5 - emailAdress + emailAddress 11 57 - private List<SimpleMailMessage> getMailsInternal(String emailAdress) { + private List<SimpleMailMessage> getMailsInternal(String emailAddress) { @@ -8023,13 +8023,13 @@ 59 59 6 - emailAdress + emailAddress 11 59 - LOG.info("resolved messages:{} for user:{}",list.size(),emailAdress); + LOG.info("resolved messages:{} for user:{}",list.size(),emailAddress); @@ -8044,7 +8044,7 @@ 59 - LOG.info("resolved messages:{} for user:{}",list.size(),emailAdress); + LOG.info("resolved messages:{} for user:{}",list.size(),emailAddress); @@ -13929,7 +13929,7 @@ 40 - path = APIConstants.API_ANONYMOUS+"integrationtest/mock/emails/to/{emailAdress}", + path = APIConstants.API_ANONYMOUS+"integrationtest/mock/emails/to/{emailAddress}", diff --git a/sechub-sereco/src/test/resources/checkmarx/sechub-continous-integration.xml b/sechub-sereco/src/test/resources/checkmarx/sechub-continous-integration.xml index 9723ab5595..8f94eb7ee8 100644 --- a/sechub-sereco/src/test/resources/checkmarx/sechub-continous-integration.xml +++ b/sechub-sereco/src/test/resources/checkmarx/sechub-continous-integration.xml @@ -6783,7 +6783,7 @@ 40 - path = APIConstants.API_ANONYMOUS+"integrationtest/mock/emails/to/{emailAdress}", + path = APIConstants.API_ANONYMOUS+"integrationtest/mock/emails/to/{emailAddress}", @@ -19192,13 +19192,13 @@ 44 86 1 - emailAdress + emailAddress 11 44 - public List<SimpleMailMessage> getMailsFor(@PathVariable(name="emailAdress") String emailAdress) { + public List<SimpleMailMessage> getMailsFor(@PathVariable(name="emailAddress") String emailAddress) { @@ -19207,13 +19207,13 @@ 46 38 2 - emailAdress + emailAddress 11 46 - return mockMailService.getMailsFor(emailAdress); + return mockMailService.getMailsFor(emailAddress); @@ -19222,13 +19222,13 @@ 49 52 3 - emailAdress + emailAddress 11 49 - public List<SimpleMailMessage> getMailsFor(String emailAdress) { + public List<SimpleMailMessage> getMailsFor(String emailAddress) { @@ -19237,13 +19237,13 @@ 51 90 4 - emailAdress + emailAddress 11 51 - LOG.info("cache eimals is disabled, so returning empty mails list for emailAdress:{}",emailAdress); + LOG.info("cache eimals is disabled, so returning empty mails list for emailAddress:{}",emailAddress); @@ -19258,7 +19258,7 @@ 51 - LOG.info("cache eimals is disabled, so returning empty mails list for emailAdress:{}",emailAdress); + LOG.info("cache eimals is disabled, so returning empty mails list for emailAddress:{}",emailAddress); @@ -19271,13 +19271,13 @@ 44 86 1 - emailAdress + emailAddress 11 44 - public List<SimpleMailMessage> getMailsFor(@PathVariable(name="emailAdress") String emailAdress) { + public List<SimpleMailMessage> getMailsFor(@PathVariable(name="emailAddress") String emailAddress) { @@ -19286,13 +19286,13 @@ 46 38 2 - emailAdress + emailAddress 11 46 - return mockMailService.getMailsFor(emailAdress); + return mockMailService.getMailsFor(emailAddress); @@ -19301,13 +19301,13 @@ 49 52 3 - emailAdress + emailAddress 11 49 - public List<SimpleMailMessage> getMailsFor(String emailAdress) { + public List<SimpleMailMessage> getMailsFor(String emailAddress) { @@ -19316,13 +19316,13 @@ 54 27 4 - emailAdress + emailAddress 11 54 - return getMailsInternal(emailAdress); + return getMailsInternal(emailAddress); @@ -19331,13 +19331,13 @@ 57 58 5 - emailAdress + emailAddress 11 57 - private List<SimpleMailMessage> getMailsInternal(String emailAdress) { + private List<SimpleMailMessage> getMailsInternal(String emailAddress) { @@ -19346,13 +19346,13 @@ 59 59 6 - emailAdress + emailAddress 11 59 - LOG.info("resolved messages:{} for user:{}",list.size(),emailAdress); + LOG.info("resolved messages:{} for user:{}",list.size(),emailAddress); @@ -19367,7 +19367,7 @@ 59 - LOG.info("resolved messages:{} for user:{}",list.size(),emailAdress); + LOG.info("resolved messages:{} for user:{}",list.size(),emailAddress); diff --git a/sechub-server/src/main/resources/db/migration/U27__rename_emailAdress_column.sql b/sechub-server/src/main/resources/db/migration/U27__rename_emailAdress_column.sql new file mode 100644 index 0000000000..7a1f88c349 --- /dev/null +++ b/sechub-server/src/main/resources/db/migration/U27__rename_emailAdress_column.sql @@ -0,0 +1,7 @@ +-- SPDX-License-Identifier: MIT +ALTER TABLE adm_user_selfregistration + RENAME COLUMN email_address TO email_adress; +ALTER TABLE adm_user + RENAME COLUMN user_email_address TO user_email_adress; + +ALTER TABLE adm_user RENAME CONSTRAINT c01_adm_user_emailaddress TO c01_adm_user_emailaddress; diff --git a/sechub-server/src/main/resources/db/migration/V27__rename_emailAdress_column.sql b/sechub-server/src/main/resources/db/migration/V27__rename_emailAdress_column.sql new file mode 100644 index 0000000000..315c717429 --- /dev/null +++ b/sechub-server/src/main/resources/db/migration/V27__rename_emailAdress_column.sql @@ -0,0 +1,7 @@ +-- SPDX-License-Identifier: MIT +ALTER TABLE adm_user_selfregistration + RENAME COLUMN email_adress TO email_address; +ALTER TABLE adm_user + RENAME COLUMN user_email_adress TO user_email_address; + +ALTER TABLE adm_user RENAME CONSTRAINT c01_adm_user_emailadress TO c01_adm_user_emailaddress; diff --git a/sechub-shared-kernel/src/main/java/com/mercedesbenz/sechub/sharedkernel/messaging/DomainMessageFactory.java b/sechub-shared-kernel/src/main/java/com/mercedesbenz/sechub/sharedkernel/messaging/DomainMessageFactory.java index 4844840b4d..d00333db79 100644 --- a/sechub-shared-kernel/src/main/java/com/mercedesbenz/sechub/sharedkernel/messaging/DomainMessageFactory.java +++ b/sechub-shared-kernel/src/main/java/com/mercedesbenz/sechub/sharedkernel/messaging/DomainMessageFactory.java @@ -34,7 +34,7 @@ public static DomainMessage createUserBecomesSuperAdmin(String userId, String em DomainMessage userBecomesSuperAdminInfo = new DomainMessage(MessageID.USER_BECOMES_SUPERADMIN); UserMessage userMessage = new UserMessage(); userMessage.setUserId(userId); - userMessage.setEmailAdress(email); + userMessage.setEmailAddress(email); userBecomesSuperAdminInfo.set(MessageDataKeys.USER_CONTACT_DATA, userMessage); userBecomesSuperAdminInfo.set(MessageDataKeys.ENVIRONMENT_BASE_URL, envbaseURL); @@ -45,7 +45,7 @@ public static DomainMessage createUserNoLongerSuperAdmin(String userId, String e DomainMessage userBecomesSuperAdminInfo = new DomainMessage(MessageID.USER_NO_LONGER_SUPERADMIN); UserMessage userMessage = new UserMessage(); userMessage.setUserId(userId); - userMessage.setEmailAdress(email); + userMessage.setEmailAddress(email); userBecomesSuperAdminInfo.set(MessageDataKeys.USER_CONTACT_DATA, userMessage); userBecomesSuperAdminInfo.set(MessageDataKeys.ENVIRONMENT_BASE_URL, envbaseURL); diff --git a/sechub-shared-kernel/src/main/java/com/mercedesbenz/sechub/sharedkernel/messaging/JobMessage.java b/sechub-shared-kernel/src/main/java/com/mercedesbenz/sechub/sharedkernel/messaging/JobMessage.java index e62af5bb9a..eaafdf361b 100644 --- a/sechub-shared-kernel/src/main/java/com/mercedesbenz/sechub/sharedkernel/messaging/JobMessage.java +++ b/sechub-shared-kernel/src/main/java/com/mercedesbenz/sechub/sharedkernel/messaging/JobMessage.java @@ -96,8 +96,8 @@ public UUID getJobUUID() { return jobUUID; } - public void setOwnerEmailAddress(String emailAdress) { - this.ownerEmailAddress = emailAdress; + public void setOwnerEmailAddress(String emailAddress) { + this.ownerEmailAddress = emailAddress; } public String getOwnerEmailAddress() { diff --git a/sechub-shared-kernel/src/main/java/com/mercedesbenz/sechub/sharedkernel/messaging/MessageDataKeys.java b/sechub-shared-kernel/src/main/java/com/mercedesbenz/sechub/sharedkernel/messaging/MessageDataKeys.java index 10b291fed4..9854d242ae 100644 --- a/sechub-shared-kernel/src/main/java/com/mercedesbenz/sechub/sharedkernel/messaging/MessageDataKeys.java +++ b/sechub-shared-kernel/src/main/java/com/mercedesbenz/sechub/sharedkernel/messaging/MessageDataKeys.java @@ -65,26 +65,26 @@ private MessageDataKeys() { public static final MessageDataKey SCHEDULER_JOB_STATUS = createKey("sechub.scheduler.job.status", SCHEDULER_JOB_MESSAGE_DATA_PROVIDER); /** - * Must contain userid, mail adress + * Must contain userid, email address */ public static final MessageDataKey USER_CONTACT_DATA = createUserMessageKey("user.signup.data"); /** - * Must contain userid, mail adress + * Must contain userid, email address */ public static final MessageDataKey USER_SIGNUP_DATA = createUserMessageKey("user.signup.data"); /** - * Must contain userid, mail adress and initial roles + * Must contain userid, email address and initial roles */ public static final MessageDataKey USER_CREATION_DATA = createUserMessageKey("user.creation.data"); /** - * Must contain userid, hashed api token and email adress + * Must contain userid, hashed api token and email address */ public static final MessageDataKey USER_API_TOKEN_DATA = createUserMessageKey("user.apitoken.data"); /** - * Must contain userid and email adress + * Must contain userid and email address */ public static final MessageDataKey USER_DELETE_DATA = createUserMessageKey("user.delete.data"); diff --git a/sechub-shared-kernel/src/main/java/com/mercedesbenz/sechub/sharedkernel/messaging/ProjectMessage.java b/sechub-shared-kernel/src/main/java/com/mercedesbenz/sechub/sharedkernel/messaging/ProjectMessage.java index 3ddd7bbc34..0ea2d10eab 100644 --- a/sechub-shared-kernel/src/main/java/com/mercedesbenz/sechub/sharedkernel/messaging/ProjectMessage.java +++ b/sechub-shared-kernel/src/main/java/com/mercedesbenz/sechub/sharedkernel/messaging/ProjectMessage.java @@ -31,7 +31,7 @@ public class ProjectMessage implements JSONable { // applicable if owner was changed private String previousOwnerEmailAddress; - private Set userEmailAdresses = new LinkedHashSet<>(2); + private Set userEmailAddresses = new LinkedHashSet<>(2); private String projectActionTriggeredBy; @@ -50,7 +50,7 @@ public Class getJSONTargetClass() { * @param emailAddress */ public void addUserEmailAddress(String emailAddress) { - userEmailAdresses.add(emailAddress); + userEmailAddresses.add(emailAddress); } /** @@ -60,8 +60,8 @@ public void addUserEmailAddress(String emailAddress) { * * @return email addresses for this project message. never null */ - public Set getUserEmailAdresses() { - return userEmailAdresses; + public Set getUserEmailAddresses() { + return userEmailAddresses; } public void setProjectOwnerEmailAddress(String emailAddress) { diff --git a/sechub-shared-kernel/src/main/java/com/mercedesbenz/sechub/sharedkernel/messaging/UserMessage.java b/sechub-shared-kernel/src/main/java/com/mercedesbenz/sechub/sharedkernel/messaging/UserMessage.java index 7665537f12..95999aed90 100644 --- a/sechub-shared-kernel/src/main/java/com/mercedesbenz/sechub/sharedkernel/messaging/UserMessage.java +++ b/sechub-shared-kernel/src/main/java/com/mercedesbenz/sechub/sharedkernel/messaging/UserMessage.java @@ -22,7 +22,7 @@ @MustBeKeptStable("This configuration is used by communication between (api) authorization domain and administration - and maybe others") public class UserMessage implements JSONable { - private String emailAdress; + private String emailAddress; private String userId; @@ -47,16 +47,16 @@ public String getUserId() { return userId; } - public void setEmailAdress(String emailAdress) { - this.emailAdress = emailAdress; + public void setEmailAddress(String emailAddress) { + this.emailAddress = emailAddress; } public List getProjectIds() { return projectIds; } - public String getEmailAdress() { - return emailAdress; + public String getEmailAddress() { + return emailAddress; } public void setUserId(String userId) { @@ -135,8 +135,8 @@ public String getFormerEmailAddress() { /** * Set the former email address of an user. Should only be called for user - * events when an email address has changed. The {@link #getEmailAdress()} shall - * contain the new mail adress in this case. + * events when an email address has changed. The {@link #getEmailAddress()} + * shall contain the new email address in this case. * * @param formerEmailAddress */ diff --git a/sechub-shared-kernel/src/main/java/com/mercedesbenz/sechub/sharedkernel/validation/UserInputAssertion.java b/sechub-shared-kernel/src/main/java/com/mercedesbenz/sechub/sharedkernel/validation/UserInputAssertion.java index 329e6883fd..ecc62726de 100644 --- a/sechub-shared-kernel/src/main/java/com/mercedesbenz/sechub/sharedkernel/validation/UserInputAssertion.java +++ b/sechub-shared-kernel/src/main/java/com/mercedesbenz/sechub/sharedkernel/validation/UserInputAssertion.java @@ -97,8 +97,8 @@ public void assertIsValidUserId(String userId) { * * @param userId */ - public void assertIsValidEmailAddress(String emailAdress) { - assertValid(emailAdress, emailValidation, "Email address is not valid"); + public void assertIsValidEmailAddress(String emailAddress) { + assertValid(emailAddress, emailValidation, "Email address is not valid"); } /** diff --git a/sechub-shared-kernel/src/test/java/com/mercedesbenz/sechub/sharedkernel/validation/EmailValidationImplTest.java b/sechub-shared-kernel/src/test/java/com/mercedesbenz/sechub/sharedkernel/validation/EmailValidationImplTest.java index 3ec4e22057..d0e4d31e98 100644 --- a/sechub-shared-kernel/src/test/java/com/mercedesbenz/sechub/sharedkernel/validation/EmailValidationImplTest.java +++ b/sechub-shared-kernel/src/test/java/com/mercedesbenz/sechub/sharedkernel/validation/EmailValidationImplTest.java @@ -16,7 +16,7 @@ public void before() { } @Test - public void somebody_at_gmail_adress_is_valid() { + public void somebody_at_gmail_address_is_valid() { assertTrue(validationToTest.validate("somebody@gmail.com").isValid()); } diff --git a/sechub-shared-kernel/src/test/java/com/mercedesbenz/sechub/sharedkernel/validation/UserInputAssertionTest.java b/sechub-shared-kernel/src/test/java/com/mercedesbenz/sechub/sharedkernel/validation/UserInputAssertionTest.java index 3c568b22b5..4d4b71f949 100644 --- a/sechub-shared-kernel/src/test/java/com/mercedesbenz/sechub/sharedkernel/validation/UserInputAssertionTest.java +++ b/sechub-shared-kernel/src/test/java/com/mercedesbenz/sechub/sharedkernel/validation/UserInputAssertionTest.java @@ -24,17 +24,17 @@ public void before() { @Test public void only_emailvalidation_is_used_when_email_is_asserted() { /* prepare */ - String validMailAdress = "mymail@example.com"; + String validEmailAddress = "myemail@example.com"; EmailValidation mockedEmailValidation = mock(EmailValidation.class); - when(mockedEmailValidation.validate(validMailAdress)).thenReturn(new ValidationResult()); + when(mockedEmailValidation.validate(validEmailAddress)).thenReturn(new ValidationResult()); assertToTest.emailValidation = mockedEmailValidation; /* execute */ - assertToTest.assertIsValidEmailAddress(validMailAdress); + assertToTest.assertIsValidEmailAddress(validEmailAddress); /* test */ - verify(mockedEmailValidation).validate(validMailAdress); + verify(mockedEmailValidation).validate(validEmailAddress); } } diff --git a/sechub-testframework/src/main/java/com/mercedesbenz/sechub/test/SecHubTestURLBuilder.java b/sechub-testframework/src/main/java/com/mercedesbenz/sechub/test/SecHubTestURLBuilder.java index 8915cc5470..d49e100b39 100644 --- a/sechub-testframework/src/main/java/com/mercedesbenz/sechub/test/SecHubTestURLBuilder.java +++ b/sechub-testframework/src/main/java/com/mercedesbenz/sechub/test/SecHubTestURLBuilder.java @@ -472,8 +472,8 @@ public String buildCountProjectScanReports(String projectId) { return buildUrl(API_ANONYMOUS, "integrationtest/project/" + projectId + "/scan/report/count"); } - public String buildFetchEmailsFromMockMailServiceUrl(String emailAdress) { - return buildUrl(API_ANONYMOUS, "integrationtest/mock/emails/to", emailAdress); + public String buildFetchEmailsFromMockMailServiceUrl(String emailAddress) { + return buildUrl(API_ANONYMOUS, "integrationtest/mock/emails/to", emailAddress); } public String buildResetAllMockMailsUrl() { diff --git a/sechub-webui/src/main/java/com/mercedesbenz/sechub/webui/NewApiTokenService.java b/sechub-webui/src/main/java/com/mercedesbenz/sechub/webui/NewApiTokenService.java index 2d7ba45410..514bac00c0 100644 --- a/sechub-webui/src/main/java/com/mercedesbenz/sechub/webui/NewApiTokenService.java +++ b/sechub-webui/src/main/java/com/mercedesbenz/sechub/webui/NewApiTokenService.java @@ -22,7 +22,7 @@ public class NewApiTokenService { * *
      *  curl
-     * 'https://sechub.example.com/api/anonymous/refresh/apitoken/emailAdress@test.
+     * 'https://sechub.example.com/api/anonymous/refresh/apitoken/emailAddress@test.
      * com' -i -X POST -H 'Content-Type: application/json;charset=UTF-8'
      * 
*/