From 7fb0aa095eef5b6eb1d64186d5656a53a855f838 Mon Sep 17 00:00:00 2001 From: Giulia Tremolada Date: Wed, 20 Nov 2024 17:41:39 +0100 Subject: [PATCH 1/4] add roles as optional request param in getUsers api --- app/src/main/resources/swagger/api-docs.json | 10 ++++++++++ .../dashboard/connector/model/user/UserInfo.java | 4 +++- .../dashboard/connector/rest/UserConnectorImpl.java | 6 ++++-- .../pagopa/selfcare/dashboard/core/UserV2Service.java | 7 +++++-- .../selfcare/dashboard/core/UserV2ServiceImpl.java | 3 ++- .../selfcare/dashboard/core/UserV2ServiceImplTest.java | 6 +++--- pom.xml | 2 +- .../dashboard/web/controller/UserV2Controller.java | 3 ++- .../dashboard/web/controller/UserV2ControllerTest.java | 10 ++++++---- 9 files changed, 36 insertions(+), 15 deletions(-) diff --git a/app/src/main/resources/swagger/api-docs.json b/app/src/main/resources/swagger/api-docs.json index 14c396cb..64ec8369 100644 --- a/app/src/main/resources/swagger/api-docs.json +++ b/app/src/main/resources/swagger/api-docs.json @@ -2466,6 +2466,16 @@ "schema" : { "type" : "string" } + }, { + "name" : "roles", + "in" : "query", + "description" : "roles", + "required" : false, + "style" : "form", + "explode" : true, + "schema" : { + "type" : "string" + } } ], "responses" : { "200" : { diff --git a/connector-api/src/main/java/it/pagopa/selfcare/dashboard/connector/model/user/UserInfo.java b/connector-api/src/main/java/it/pagopa/selfcare/dashboard/connector/model/user/UserInfo.java index c8d4239f..e716606d 100644 --- a/connector-api/src/main/java/it/pagopa/selfcare/dashboard/connector/model/user/UserInfo.java +++ b/connector-api/src/main/java/it/pagopa/selfcare/dashboard/connector/model/user/UserInfo.java @@ -5,7 +5,8 @@ import lombok.Data; import lombok.EqualsAndHashCode; -import java.util.*; +import java.util.List; +import java.util.Map; @Data @EqualsAndHashCode(of = "id") @@ -24,6 +25,7 @@ public static class UserInfoFilter { private SelfCareAuthority role; private String productId; private List productRoles; + private List roles; private String userId; private List allowedStates; } diff --git a/connector/rest/src/main/java/it/pagopa/selfcare/dashboard/connector/rest/UserConnectorImpl.java b/connector/rest/src/main/java/it/pagopa/selfcare/dashboard/connector/rest/UserConnectorImpl.java index 39d582dd..45385a25 100644 --- a/connector/rest/src/main/java/it/pagopa/selfcare/dashboard/connector/rest/UserConnectorImpl.java +++ b/connector/rest/src/main/java/it/pagopa/selfcare/dashboard/connector/rest/UserConnectorImpl.java @@ -177,10 +177,12 @@ public Collection getUsers(String institutionId, UserInfo.UserInfoFilt Assert.hasText(institutionId, REQUIRED_INSTITUTION_ID_MESSAGE); - List roles = Arrays.stream(PartyRole.values()) + List roles = userInfoFilter.getRoles() == null ? + Arrays.stream(PartyRole.values()) .filter(partyRole -> partyRole.getSelfCareAuthority().equals(userInfoFilter.getRole())) .map(Enum::name) - .toList(); + .toList() + : userInfoFilter.getRoles(); return Optional.ofNullable(userApiRestClient._retrieveUsers(institutionId, loggedUserId, diff --git a/core/src/main/java/it/pagopa/selfcare/dashboard/core/UserV2Service.java b/core/src/main/java/it/pagopa/selfcare/dashboard/core/UserV2Service.java index c5bd523a..847fbdb2 100644 --- a/core/src/main/java/it/pagopa/selfcare/dashboard/core/UserV2Service.java +++ b/core/src/main/java/it/pagopa/selfcare/dashboard/core/UserV2Service.java @@ -1,7 +1,10 @@ package it.pagopa.selfcare.dashboard.core; import it.pagopa.selfcare.dashboard.connector.model.institution.InstitutionBase; -import it.pagopa.selfcare.dashboard.connector.model.user.*; +import it.pagopa.selfcare.dashboard.connector.model.user.UpdateUserRequestDto; +import it.pagopa.selfcare.dashboard.connector.model.user.User; +import it.pagopa.selfcare.dashboard.connector.model.user.UserInfo; +import it.pagopa.selfcare.dashboard.connector.model.user.UserToCreate; import java.util.Collection; import java.util.List; @@ -23,7 +26,7 @@ public interface UserV2Service { void updateUser(String id, String institutionId, UpdateUserRequestDto userDto); - Collection getUsersByInstitutionId(String institutionId, String productId, List productRoles, String loggedUserId); + Collection getUsersByInstitutionId(String institutionId, String productId, List productRoles, List roles , String loggedUserId); String createUsers(String institutionId, String productId, UserToCreate userToCreate); diff --git a/core/src/main/java/it/pagopa/selfcare/dashboard/core/UserV2ServiceImpl.java b/core/src/main/java/it/pagopa/selfcare/dashboard/core/UserV2ServiceImpl.java index 77f243d7..43228751 100644 --- a/core/src/main/java/it/pagopa/selfcare/dashboard/core/UserV2ServiceImpl.java +++ b/core/src/main/java/it/pagopa/selfcare/dashboard/core/UserV2ServiceImpl.java @@ -117,13 +117,14 @@ public void updateUser(String id, String institutionId, UpdateUserRequestDto use } @Override - public Collection getUsersByInstitutionId(String institutionId, String productId, List productRoles, String loggedUserId) { + public Collection getUsersByInstitutionId(String institutionId, String productId, List productRoles, List roles, String loggedUserId) { log.trace("getUsersByInstitutionId start"); log.debug("getUsersByInstitutionId institutionId = {}", institutionId); UserInfo.UserInfoFilter userInfoFilter = new UserInfo.UserInfoFilter(); userInfoFilter.setProductId(productId); userInfoFilter.setProductRoles(productRoles); userInfoFilter.setAllowedStates(allowedStates); + userInfoFilter.setRoles(roles); Collection result = userApiConnector.getUsers(institutionId, userInfoFilter, loggedUserId); log.info("getUsersByInstitutionId result size = {}", result.size()); log.trace("getUsersByInstitutionId end"); diff --git a/core/src/test/java/it/pagopa/selfcare/dashboard/core/UserV2ServiceImplTest.java b/core/src/test/java/it/pagopa/selfcare/dashboard/core/UserV2ServiceImplTest.java index e1f6815d..af8c0cfe 100644 --- a/core/src/test/java/it/pagopa/selfcare/dashboard/core/UserV2ServiceImplTest.java +++ b/core/src/test/java/it/pagopa/selfcare/dashboard/core/UserV2ServiceImplTest.java @@ -152,7 +152,7 @@ void getUsersByInstitutionIdWithoutInstitutionId() { List productRoles = new ArrayList<>(); String loggedUserId = "loggedUserId"; - Collection result = userV2ServiceImpl.getUsersByInstitutionId(institutionId, productId, productRoles, loggedUserId); + Collection result = userV2ServiceImpl.getUsersByInstitutionId(institutionId, productId, productRoles, null, loggedUserId); Assertions.assertTrue(result.isEmpty()); } @@ -171,7 +171,7 @@ void getUsersByInstitutionIdEmptyUserInfo() { when(userApiConnectorMock.getUsers(institutionId, userInfoFilter, loggedUserId)).thenReturn(new ArrayList<>()); - Collection result = userV2ServiceImpl.getUsersByInstitutionId(institutionId, productId, productRoles, loggedUserId); + Collection result = userV2ServiceImpl.getUsersByInstitutionId(institutionId, productId, productRoles, null, loggedUserId); Assertions.assertTrue(result.isEmpty()); } @@ -195,7 +195,7 @@ void getUsersByInstitutionId() throws IOException { when(userApiConnectorMock.getUsers(institutionId, userInfoFilter, loggedUserId)).thenReturn(userInfo); - Collection result = userV2ServiceImpl.getUsersByInstitutionId(institutionId, productId, productRoles, loggedUserId); + Collection result = userV2ServiceImpl.getUsersByInstitutionId(institutionId, productId, productRoles, null, loggedUserId); Assertions.assertEquals(userInfo, result); Mockito.verify(userApiConnectorMock, Mockito.times(1)).getUsers(institutionId, userInfoFilter, loggedUserId); } diff --git a/pom.xml b/pom.xml index 50d9d8fd..720884a8 100644 --- a/pom.xml +++ b/pom.xml @@ -22,7 +22,7 @@ Self Care Dashboard Backend - 2.5.3 + 2.5.4 https://sonarcloud.io/ diff --git a/web/src/main/java/it/pagopa/selfcare/dashboard/web/controller/UserV2Controller.java b/web/src/main/java/it/pagopa/selfcare/dashboard/web/controller/UserV2Controller.java index 3a106486..705b4ec6 100644 --- a/web/src/main/java/it/pagopa/selfcare/dashboard/web/controller/UserV2Controller.java +++ b/web/src/main/java/it/pagopa/selfcare/dashboard/web/controller/UserV2Controller.java @@ -163,13 +163,14 @@ public List getUsers(@ApiParam("${swagger.dashboard.institu @PathVariable("institutionId") String institutionId, @RequestParam(value = "productId", required = false) String productId, @RequestParam(value = "productRoles", required = false) List productRoles, + @RequestParam(value = "roles", required = false) List roles, Authentication authentication) { log.trace("getUsers start"); log.debug("getUsers for institution: {} and product: {}", institutionId, productId); String loggedUserId = ((SelfCareUser) authentication.getPrincipal()).getId(); List response = new ArrayList<>(); - Collection userInfos = userService.getUsersByInstitutionId(institutionId, productId, productRoles, loggedUserId); + Collection userInfos = userService.getUsersByInstitutionId(institutionId, productId, productRoles, roles, loggedUserId); userInfos.forEach(userInfo -> response.addAll(UserMapper.toProductUsers(userInfo))); log.debug("getUsers result = {}", response); log.trace("getUsers end"); diff --git a/web/src/test/java/it/pagopa/selfcare/dashboard/web/controller/UserV2ControllerTest.java b/web/src/test/java/it/pagopa/selfcare/dashboard/web/controller/UserV2ControllerTest.java index 42940081..7b2a4adf 100644 --- a/web/src/test/java/it/pagopa/selfcare/dashboard/web/controller/UserV2ControllerTest.java +++ b/web/src/test/java/it/pagopa/selfcare/dashboard/web/controller/UserV2ControllerTest.java @@ -9,6 +9,7 @@ import it.pagopa.selfcare.dashboard.web.model.UpdateUserDto; import it.pagopa.selfcare.dashboard.web.model.mapper.UserMapperV2Impl; import it.pagopa.selfcare.dashboard.web.model.user.UserResource; +import it.pagopa.selfcare.onboarding.common.PartyRole; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; @@ -223,13 +224,14 @@ void getUsers_institutionIdProductIdValid() throws Exception { UserInfo userInfo = objectMapper.readValue(userInfoStream, UserInfo.class); List userInfos = List.of(userInfo); - when(userServiceMock.getUsersByInstitutionId(institutionId, productId, null, "userId")).thenReturn(userInfos); + when(userServiceMock.getUsersByInstitutionId(institutionId, productId, null, List.of(PartyRole.MANAGER.name()), "userId")).thenReturn(userInfos); // when mockMvc.perform(MockMvcRequestBuilders .get(BASE_URL + "/institution/" + institutionId) .principal(authentication) .queryParam("productId", productId) + .queryParam("roles", PartyRole.MANAGER.name()) .contentType(APPLICATION_JSON_VALUE) .accept(APPLICATION_JSON_VALUE)) .andExpect(status().isOk()) @@ -237,7 +239,7 @@ void getUsers_institutionIdProductIdValid() throws Exception { // then verify(userServiceMock, times(1)) - .getUsersByInstitutionId(institutionId, productId, null, "userId"); + .getUsersByInstitutionId(institutionId, productId, null, List.of(PartyRole.MANAGER.name()), "userId"); verifyNoMoreInteractions(userServiceMock); } @@ -397,7 +399,7 @@ void getUsers_institutionIdProductIdValid_EmptyObject() throws Exception { when(authentication.getPrincipal()).thenReturn(SelfCareUser.builder("userId").build()); // when - when(userServiceMock.getUsersByInstitutionId(institutionId, productId, null, "userId")) + when(userServiceMock.getUsersByInstitutionId(institutionId, productId, null, null, "userId")) .thenReturn(List.of(new UserInfo())); // when @@ -412,7 +414,7 @@ void getUsers_institutionIdProductIdValid_EmptyObject() throws Exception { // then verify(userServiceMock, times(1)) - .getUsersByInstitutionId(institutionId, productId, null, "userId"); + .getUsersByInstitutionId(institutionId, productId, null, null, "userId"); verifyNoMoreInteractions(userServiceMock); } From f83faa6f366da385f4c6b668474ffd599adcf9df Mon Sep 17 00:00:00 2001 From: Giulia Tremolada Date: Thu, 21 Nov 2024 12:46:28 +0100 Subject: [PATCH 2/4] add createdAt and fiscalCode fields --- app/src/main/resources/swagger/api-docs.json | 9 +++++++++ .../dashboard/connector/model/user/ProductInfo.java | 2 ++ .../connector/rest/model/mapper/UserMapper.java | 2 +- .../selfcare/dashboard/web/model/mapper/UserMapper.java | 2 ++ .../dashboard/web/model/product/ProductUserResource.java | 7 +++++++ web/src/main/resources/swagger/swagger_en.properties | 1 + 6 files changed, 22 insertions(+), 1 deletion(-) diff --git a/app/src/main/resources/swagger/api-docs.json b/app/src/main/resources/swagger/api-docs.json index 64ec8369..754bf89f 100644 --- a/app/src/main/resources/swagger/api-docs.json +++ b/app/src/main/resources/swagger/api-docs.json @@ -4003,10 +4003,19 @@ "title" : "ProductUserResource", "type" : "object", "properties" : { + "createdAt" : { + "type" : "string", + "description" : "User's creation date associated with a product", + "format" : "date-time" + }, "email" : { "type" : "string", "description" : "User's personal email" }, + "fiscalCode" : { + "type" : "string", + "description" : "User's fiscal code" + }, "id" : { "type" : "string", "description" : "User's unique identifier", diff --git a/connector-api/src/main/java/it/pagopa/selfcare/dashboard/connector/model/user/ProductInfo.java b/connector-api/src/main/java/it/pagopa/selfcare/dashboard/connector/model/user/ProductInfo.java index e5f46fdf..20b16291 100644 --- a/connector-api/src/main/java/it/pagopa/selfcare/dashboard/connector/model/user/ProductInfo.java +++ b/connector-api/src/main/java/it/pagopa/selfcare/dashboard/connector/model/user/ProductInfo.java @@ -2,6 +2,7 @@ import lombok.Data; +import java.time.LocalDateTime; import java.util.List; @Data @@ -10,5 +11,6 @@ public class ProductInfo { private String id; private String title; private List roleInfos; + private LocalDateTime createdAt; } diff --git a/connector/rest/src/main/java/it/pagopa/selfcare/dashboard/connector/rest/model/mapper/UserMapper.java b/connector/rest/src/main/java/it/pagopa/selfcare/dashboard/connector/rest/model/mapper/UserMapper.java index 12e50ec5..21076161 100644 --- a/connector/rest/src/main/java/it/pagopa/selfcare/dashboard/connector/rest/model/mapper/UserMapper.java +++ b/connector/rest/src/main/java/it/pagopa/selfcare/dashboard/connector/rest/model/mapper/UserMapper.java @@ -3,7 +3,6 @@ import it.pagopa.selfcare.dashboard.connector.model.user.User; import it.pagopa.selfcare.dashboard.connector.model.user.*; import it.pagopa.selfcare.user.generated.openapi.v1.dto.*; -import it.pagopa.selfcare.user.generated.openapi.v1.dto.UserInstitutionWithActions; import org.mapstruct.Mapper; import org.mapstruct.Mapping; import org.mapstruct.Named; @@ -92,6 +91,7 @@ default Map toProductInfoMap(List onboardedProducts.forEach(onboardedProduct -> { RoleInfo roleInfo = new RoleInfo(); productInfo.setId(onboardedProduct.getProductId()); + productInfo.setCreatedAt(onboardedProduct.getCreatedAt()); roleInfo.setRole(onboardedProduct.getProductRole()); roleInfo.setStatus(onboardedProduct.getStatus().name()); roleInfo.setSelcRole(it.pagopa.selfcare.commons.base.security.PartyRole.valueOf(onboardedProduct.getRole()).getSelfCareAuthority()); diff --git a/web/src/main/java/it/pagopa/selfcare/dashboard/web/model/mapper/UserMapper.java b/web/src/main/java/it/pagopa/selfcare/dashboard/web/model/mapper/UserMapper.java index 2a9263e3..19321211 100644 --- a/web/src/main/java/it/pagopa/selfcare/dashboard/web/model/mapper/UserMapper.java +++ b/web/src/main/java/it/pagopa/selfcare/dashboard/web/model/mapper/UserMapper.java @@ -154,6 +154,7 @@ public static List toProductUsers(UserInfo model) { if (model.getUser() != null) { resource.setName(CertifiedFieldMapper.toValue(model.getUser().getName())); resource.setSurname(CertifiedFieldMapper.toValue(model.getUser().getFamilyName())); + resource.setFiscalCode(model.getUser().getFiscalCode()); Optional.ofNullable(model.getUser().getWorkContacts()) .map(map -> map.get(model.getUserMailUuid())) .map(WorkContact::getEmail) @@ -161,6 +162,7 @@ public static List toProductUsers(UserInfo model) { .ifPresent(resource::setEmail); } resource.setProduct(UserMapper.toUserProductInfoResource(productInfo)); + resource.setCreatedAt(productInfo.getCreatedAt()); response.add(resource); }); } diff --git a/web/src/main/java/it/pagopa/selfcare/dashboard/web/model/product/ProductUserResource.java b/web/src/main/java/it/pagopa/selfcare/dashboard/web/model/product/ProductUserResource.java index 83c94e2c..3bc71289 100644 --- a/web/src/main/java/it/pagopa/selfcare/dashboard/web/model/product/ProductUserResource.java +++ b/web/src/main/java/it/pagopa/selfcare/dashboard/web/model/product/ProductUserResource.java @@ -16,6 +16,7 @@ import it.pagopa.selfcare.commons.base.security.SelfCareAuthority; import lombok.Data; +import java.time.LocalDateTime; import java.util.UUID; @Data @@ -30,6 +31,9 @@ public class ProductUserResource { @ApiModelProperty(value = "${swagger.dashboard.user.model.surname}") private String surname; + @ApiModelProperty(value = "${swagger.dashboard.user.model.fiscalCode}") + private String fiscalCode; + @ApiModelProperty(value = "${swagger.dashboard.user.model.email}") private String email; @@ -42,5 +46,8 @@ public class ProductUserResource { @ApiModelProperty(value = "${swagger.dashboard.user.model.status}") private String status; + @ApiModelProperty(value = "${swagger.dashboard.user.model.createdAt}") + private LocalDateTime createdAt; + } diff --git a/web/src/main/resources/swagger/swagger_en.properties b/web/src/main/resources/swagger/swagger_en.properties index 8bd4c72a..70beb4e9 100644 --- a/web/src/main/resources/swagger/swagger_en.properties +++ b/web/src/main/resources/swagger/swagger_en.properties @@ -105,6 +105,7 @@ swagger.dashboard.user.model.workContacts=User's workcontacts, contains the emai swagger.dashboard.user.model.institutionalEmail=User's institutional email swagger.dashboard.user.model.role=User's role, available value: [MANAGER, DELEGATE, SUBDELEGATE, OPERATOR, ADMIN_EA] swagger.dashboard.user.model.fields=Fields to retrieve from pdv when searching for user +swagger.dashboard.user.model.createdAt=User's creation date associated with a product swagger.dashboard.products.model.roleInfos=User's role infos in product swagger.dashboard.user.model.productRoles=User's roles in product swagger.dashboard.user.model.productRole=User's role in product From 4abfb55b83ca26897b6eb7cc5f51058d4660f95e Mon Sep 17 00:00:00 2001 From: Giulia Tremolada Date: Fri, 22 Nov 2024 15:36:18 +0100 Subject: [PATCH 3/4] refactor using optional of nullable --- .../dashboard/connector/rest/UserConnectorImpl.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/connector/rest/src/main/java/it/pagopa/selfcare/dashboard/connector/rest/UserConnectorImpl.java b/connector/rest/src/main/java/it/pagopa/selfcare/dashboard/connector/rest/UserConnectorImpl.java index 45385a25..85684eb1 100644 --- a/connector/rest/src/main/java/it/pagopa/selfcare/dashboard/connector/rest/UserConnectorImpl.java +++ b/connector/rest/src/main/java/it/pagopa/selfcare/dashboard/connector/rest/UserConnectorImpl.java @@ -177,12 +177,11 @@ public Collection getUsers(String institutionId, UserInfo.UserInfoFilt Assert.hasText(institutionId, REQUIRED_INSTITUTION_ID_MESSAGE); - List roles = userInfoFilter.getRoles() == null ? + List roles = Optional.ofNullable(userInfoFilter.getRoles()).orElse( Arrays.stream(PartyRole.values()) - .filter(partyRole -> partyRole.getSelfCareAuthority().equals(userInfoFilter.getRole())) - .map(Enum::name) - .toList() - : userInfoFilter.getRoles(); + .filter(partyRole -> partyRole.getSelfCareAuthority().equals(userInfoFilter.getRole())) + .map(Enum::name) + .toList()); return Optional.ofNullable(userApiRestClient._retrieveUsers(institutionId, loggedUserId, From f48a96aa970d0a94a91e31a8fef574f3857bf55f Mon Sep 17 00:00:00 2001 From: Giulia Tremolada Date: Fri, 22 Nov 2024 17:05:38 +0100 Subject: [PATCH 4/4] align selcRole description --- app/src/main/resources/swagger/api-docs.json | 4 ++-- .../dashboard/web/model/product/ProductRoleInfoResource.java | 2 +- .../dashboard/web/model/product/ProductUserResource.java | 2 +- web/src/main/resources/swagger/swagger_en.properties | 1 + 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/src/main/resources/swagger/api-docs.json b/app/src/main/resources/swagger/api-docs.json index 754bf89f..e3582c81 100644 --- a/app/src/main/resources/swagger/api-docs.json +++ b/app/src/main/resources/swagger/api-docs.json @@ -3938,7 +3938,7 @@ }, "selcRole" : { "type" : "string", - "description" : "User's role, available value: [MANAGER, DELEGATE, SUBDELEGATE, OPERATOR, ADMIN_EA]", + "description" : "User's Selfcare role, available value: [ADMIN, ADMIN_EA, LIMITED]", "enum" : [ "ADMIN", "ADMIN_EA", "LIMITED" ] }, "status" : { @@ -4031,7 +4031,7 @@ }, "role" : { "type" : "string", - "description" : "User's role, available value: [MANAGER, DELEGATE, SUBDELEGATE, OPERATOR, ADMIN_EA]", + "description" : "User's Selfcare role, available value: [ADMIN, ADMIN_EA, LIMITED]", "enum" : [ "ADMIN", "ADMIN_EA", "LIMITED" ] }, "status" : { diff --git a/web/src/main/java/it/pagopa/selfcare/dashboard/web/model/product/ProductRoleInfoResource.java b/web/src/main/java/it/pagopa/selfcare/dashboard/web/model/product/ProductRoleInfoResource.java index 0cea1141..38247fe6 100644 --- a/web/src/main/java/it/pagopa/selfcare/dashboard/web/model/product/ProductRoleInfoResource.java +++ b/web/src/main/java/it/pagopa/selfcare/dashboard/web/model/product/ProductRoleInfoResource.java @@ -13,7 +13,7 @@ public class ProductRoleInfoResource { private String role; @ApiModelProperty(value = "${swagger.dashboard.user.model.status}") private String status; - @ApiModelProperty(value = "${swagger.dashboard.user.model.role}") + @ApiModelProperty(value = "${swagger.dashboard.user.model.selcRole}") private SelfCareAuthority selcRole; } diff --git a/web/src/main/java/it/pagopa/selfcare/dashboard/web/model/product/ProductUserResource.java b/web/src/main/java/it/pagopa/selfcare/dashboard/web/model/product/ProductUserResource.java index 3bc71289..23f9118b 100644 --- a/web/src/main/java/it/pagopa/selfcare/dashboard/web/model/product/ProductUserResource.java +++ b/web/src/main/java/it/pagopa/selfcare/dashboard/web/model/product/ProductUserResource.java @@ -37,7 +37,7 @@ public class ProductUserResource { @ApiModelProperty(value = "${swagger.dashboard.user.model.email}") private String email; - @ApiModelProperty(value = "${swagger.dashboard.user.model.role}") + @ApiModelProperty(value = "${swagger.dashboard.user.model.selcRole}") private SelfCareAuthority role; @ApiModelProperty(value = "${swagger.dashboard.user.model.product}") diff --git a/web/src/main/resources/swagger/swagger_en.properties b/web/src/main/resources/swagger/swagger_en.properties index 70beb4e9..8e5be378 100644 --- a/web/src/main/resources/swagger/swagger_en.properties +++ b/web/src/main/resources/swagger/swagger_en.properties @@ -104,6 +104,7 @@ swagger.dashboard.user.model.email=User's personal email swagger.dashboard.user.model.workContacts=User's workcontacts, contains the emails associated to every institution the user is assigned to swagger.dashboard.user.model.institutionalEmail=User's institutional email swagger.dashboard.user.model.role=User's role, available value: [MANAGER, DELEGATE, SUBDELEGATE, OPERATOR, ADMIN_EA] +swagger.dashboard.user.model.selcRole=User's Selfcare role, available value: [ADMIN, ADMIN_EA, LIMITED] swagger.dashboard.user.model.fields=Fields to retrieve from pdv when searching for user swagger.dashboard.user.model.createdAt=User's creation date associated with a product swagger.dashboard.products.model.roleInfos=User's role infos in product