Skip to content

Commit

Permalink
fix: CARITAS-243 - remove feedback related fields from DTOs on userse…
Browse files Browse the repository at this point in the history
…rvice.yaml
  • Loading branch information
Leandro13Silva13 committed Aug 19, 2024
1 parent 084f82c commit bebcb47
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
11 changes: 0 additions & 11 deletions services/userservice.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1184,10 +1184,6 @@ components:
type: string
example: xGklslk2JJKK
description: Rocket.Chat room ID
feedbackGroupId:
type: string
example: 8ertjlasdKJA
description: Rocket.Chat feedback room ID
askerRcId:
type: string
example: 8ertjlasdKJA
Expand All @@ -1202,9 +1198,6 @@ components:
messagesRead:
type: boolean
example: false
feedbackRead:
type: boolean
example: true
isTeamSession:
type: boolean
example: false
Expand Down Expand Up @@ -1316,10 +1309,6 @@ components:
type: string
example: xGklslk2JJKK
description: Rocket.Chat room ID
feedbackGroupId:
type: string
example: 8ertjlasdKJA
description: Rocket.Chat feedback room ID
consultantId:
type: string
example: 926b9777-4eef-443d-925a-4aa534797bd7
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ void resolve_should_ResolveTechnicalTenantId_ForTechnicalUserRole() {
void resolve_should_NotResolveTenantId_When_NonTechnicalUserRole() {
// given
givenUserIsAuthenticated();
when(mockAuthentication.getPrincipal()).thenReturn((Object) buildJwtWithRealmRole("another-role"));
when(mockAuthentication.getPrincipal())
.thenReturn((Object) buildJwtWithRealmRole("another-role"));
var resolved = technicalUserTenantResolver.resolve(authenticatedRequest);
// then
assertThat(resolved).isEmpty();
Expand All @@ -78,7 +79,11 @@ private Jwt buildJwtWithRealmRole(String realmRole) {
headers.put("alg", "HS256"); // Signature algorithm
headers.put("typ", "JWT"); // Token type
return new Jwt(
"token", Instant.now(), Instant.now().plusSeconds(1), headers, givenClaimMapContainingRole(realmRole));
"token",
Instant.now(),
Instant.now().plusSeconds(1),
headers,
givenClaimMapContainingRole(realmRole));
}

private HashMap<String, Object> givenClaimMapContainingRole(String realmRole) {
Expand Down

0 comments on commit bebcb47

Please sign in to comment.