Skip to content

Commit 91c4d1a

Browse files
authored
Merge pull request #565 from ita-social-projects/dev
Merge dev to prod
2 parents 578408f + be228f9 commit 91c4d1a

File tree

21 files changed

+210
-170
lines changed

21 files changed

+210
-170
lines changed

az-cd-pipeline-prod.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ pr: none
1212
variables:
1313
agentOS: ubuntu-latest
1414

15-
azKeyVault: greencity-app
15+
azKeyVault: greencity-values
1616

1717
artifactName: drop
1818
userRepoName: core

core/src/main/java/greencity/config/SecurityConfig.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,12 @@ public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Excepti
186186
"/management/socialnetworkimages/get-all-remote",
187187
"/management/socialnetworkimages/find",
188188
"/ownSecurity/authorities/categories",
189-
"/ownSecurity/authorities/by-category")
189+
"/ownSecurity/authorities/by-category",
190+
"/user/findByUuid/external")
191+
.hasAnyRole(ADMIN, UBS_EMPLOYEE, MODERATOR, EMPLOYEE)
192+
.requestMatchers(HttpMethod.POST,
193+
"/email/sendReasonOfDeactivation",
194+
"/email/sendMessageOfActivation")
190195
.hasAnyRole(ADMIN, UBS_EMPLOYEE, MODERATOR, EMPLOYEE)
191196
.requestMatchers(HttpMethod.PATCH,
192197
"/user/to-do-list-items/{userToDoListItemId}",
@@ -215,8 +220,6 @@ public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Excepti
215220
"/email/sendReport",
216221
"/email/sendHabitNotification",
217222
"/email/sendInterestingEcoNews",
218-
"/email/sendReasonOfDeactivation",
219-
"/email/sendMessageOfActivation",
220223
"/management/socialnetworkimages/save-remote",
221224
"/user-notification-preference/search",
222225
FILES + "/single")
@@ -234,8 +237,7 @@ public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Excepti
234237
"/user/roles-distribution",
235238
"/user/findByEmailAdvanced",
236239
"/user/isOnline",
237-
"/user/greencity/lang",
238-
"/user/findByUuid/external")
240+
"/user/greencity/lang")
239241
.hasAnyRole(ADMIN)
240242
.requestMatchers(HttpMethod.DELETE,
241243
"/management/socialnetworkimages/delete",

core/src/main/java/greencity/exception/handler/CustomExceptionHandler.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -495,4 +495,12 @@ public final ResponseEntity<Object> handleErrorParsingException(ErrorParsingExce
495495

496496
return ResponseEntity.status(HttpStatus.BAD_GATEWAY).body(exceptionResponse);
497497
}
498+
499+
@ExceptionHandler({UserProfileCreationException.class})
500+
public ResponseEntity<ExceptionResponse> handleUserProfileCreationException(UserProfileCreationException ex,
501+
WebRequest request) {
502+
log.info(ex.getMessage());
503+
ExceptionResponse exceptionResponse = new ExceptionResponse(getErrorAttributes(request));
504+
return ResponseEntity.status(HttpStatus.SERVICE_UNAVAILABLE).body(exceptionResponse);
505+
}
498506
}

core/src/main/resources/application.properties

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,6 @@ security.jwt.verify-email.expiration-hours=${JWT_VERIFY_EMAIL_EXPIRATION_HOURS}
4141
security.brute-force.max-attempts=${BRUTE_FORCE_MAX_ATTEMPTS}
4242
security.brute-force.block-time-minutes=${BRUTE_FORCE_BLOCK_TIME_MINUTES}
4343

44-
# Logger
45-
logging.level.root=${LOGGING_LEVEL_ROOT:debug}
46-
logging.level.greencity.exception.handler.CustomExceptionHandler=${LOGGING_LEVEL_EXCEPTION_HANDLER:ERROR}
47-
logging.file.path=${LOGGING_FILE_PATH:logs}
48-
logging.file.name=${LOGGING_FILE_NAME:logs/log.log}
49-
logging.pattern.file=%d{"yyyy/MM/dd HH:mm:ss,SSS"} %magenta([%thread]) %highlight(%-5level) %M\\(%F:%L\\) - %msg%n
50-
5144
# Cache
5245
spring.cache.caffeine.spec=${CACHE_CAFFEINE_SPEC}
5346

dao/src/main/java/greencity/dto/filter/FilterUserDto.java

Lines changed: 0 additions & 14 deletions
This file was deleted.

dao/src/main/java/greencity/entity/User.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public class User {
9292
@OneToOne(mappedBy = "user", cascade = {CascadeType.PERSIST, CascadeType.REMOVE})
9393
private VerifyEmail verifyEmail;
9494

95-
@OneToOne(mappedBy = "user", cascade = CascadeType.PERSIST)
95+
@OneToOne(mappedBy = "user", cascade = {CascadeType.PERSIST, CascadeType.REMOVE})
9696
private RestorePasswordEmail restorePasswordEmail;
9797

9898
@Enumerated(value = EnumType.ORDINAL)

dao/src/main/java/greencity/enums/EmailNotification.java

Lines changed: 0 additions & 9 deletions
This file was deleted.

dao/src/main/java/greencity/enums/EmailPreference.java

Lines changed: 0 additions & 9 deletions
This file was deleted.

dao/src/main/java/greencity/enums/EmailPreferencePeriodicity.java

Lines changed: 0 additions & 10 deletions
This file was deleted.

dao/src/main/java/greencity/enums/ProfilePrivacyPolicy.java

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)