diff --git a/pom.xml b/pom.xml index b67f3b1640..3bab86f59a 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ org.gbif.registry registry-parent - 3.59-SNAPSHOT + 3.60-SNAPSHOT GBIF Registry Parent GBIF Registry project @@ -19,7 +19,7 @@ scm:git:git@github.com:gbif/registry.git https://github.com/gbif/registry scm:git:git@github.com:gbif/registry.git - HEAD + registry-parent-3.59 @@ -82,6 +82,7 @@ 2.2.6.RELEASE 2.2.4.RELEASE 2.0.1 + 1.5.8 2.2.8.RELEASE @@ -91,7 +92,7 @@ 1.15 1.10 2.14 - 1.41 + 1.42 0.10 1.0 0.36 @@ -222,6 +223,11 @@ spring-cloud-starter-sleuth ${spring-cloud-sleuth.version} + + org.springdoc + springdoc-openapi-ui + ${springdoc-openapi-ui.version} + diff --git a/registry-cli/pom.xml b/registry-cli/pom.xml index 6169bac1b3..42e99178c2 100644 --- a/registry-cli/pom.xml +++ b/registry-cli/pom.xml @@ -4,7 +4,7 @@ org.gbif.registry registry-parent - 3.59-SNAPSHOT + 3.60-SNAPSHOT registry-cli diff --git a/registry-directory/pom.xml b/registry-directory/pom.xml index b184ff1564..1b9c96aaf1 100644 --- a/registry-directory/pom.xml +++ b/registry-directory/pom.xml @@ -3,7 +3,7 @@ registry-parent org.gbif.registry - 3.59-SNAPSHOT + 3.60-SNAPSHOT 4.0.0 diff --git a/registry-doi/pom.xml b/registry-doi/pom.xml index 2a5856abac..3330eab15a 100644 --- a/registry-doi/pom.xml +++ b/registry-doi/pom.xml @@ -3,7 +3,7 @@ registry-parent org.gbif.registry - 3.59-SNAPSHOT + 3.60-SNAPSHOT 4.0.0 diff --git a/registry-domain/pom.xml b/registry-domain/pom.xml index 2c4b2fa68d..f5b668a4f5 100644 --- a/registry-domain/pom.xml +++ b/registry-domain/pom.xml @@ -3,7 +3,7 @@ registry-parent org.gbif.registry - 3.59-SNAPSHOT + 3.60-SNAPSHOT 4.0.0 diff --git a/registry-events/pom.xml b/registry-events/pom.xml index 2ed906b8f8..c0aa7ba98a 100644 --- a/registry-events/pom.xml +++ b/registry-events/pom.xml @@ -3,7 +3,7 @@ registry-parent org.gbif.registry - 3.59-SNAPSHOT + 3.60-SNAPSHOT 4.0.0 diff --git a/registry-examples/pom.xml b/registry-examples/pom.xml index 16ac9e443b..a9af537103 100644 --- a/registry-examples/pom.xml +++ b/registry-examples/pom.xml @@ -3,12 +3,12 @@ registry-parent org.gbif.registry - 3.59-SNAPSHOT + 3.60-SNAPSHOT 4.0.0 registry-examples - 3.59-SNAPSHOT + 3.60-SNAPSHOT jar diff --git a/registry-identity/pom.xml b/registry-identity/pom.xml index e602938985..998bf8118e 100644 --- a/registry-identity/pom.xml +++ b/registry-identity/pom.xml @@ -3,7 +3,7 @@ registry-parent org.gbif.registry - 3.59-SNAPSHOT + 3.60-SNAPSHOT 4.0.0 diff --git a/registry-integration-tests/pom.xml b/registry-integration-tests/pom.xml index bfabf18f1e..84bb5be0e6 100644 --- a/registry-integration-tests/pom.xml +++ b/registry-integration-tests/pom.xml @@ -3,7 +3,7 @@ registry-parent org.gbif.registry - 3.59-SNAPSHOT + 3.60-SNAPSHOT 4.0.0 diff --git a/registry-integration-tests/src/test/java/org/gbif/registry/ws/it/UserManagementIT.java b/registry-integration-tests/src/test/java/org/gbif/registry/ws/it/UserManagementIT.java index 21b7944889..6e2e6ddf86 100644 --- a/registry-integration-tests/src/test/java/org/gbif/registry/ws/it/UserManagementIT.java +++ b/registry-integration-tests/src/test/java/org/gbif/registry/ws/it/UserManagementIT.java @@ -28,6 +28,7 @@ import org.gbif.registry.identity.model.UserModelMutationResult; import org.gbif.registry.identity.mybatis.IdentitySuretyTestHelper; import org.gbif.registry.search.test.EsManageServer; +import org.gbif.registry.security.UserRoles; import org.gbif.registry.ws.it.fixtures.RequestTestFixture; import org.gbif.registry.ws.it.fixtures.UserTestFixture; import org.gbif.ws.client.filter.SimplePrincipalProvider; @@ -120,6 +121,7 @@ public void testCreateUser() throws Exception { .getSignedRequest(TEST_ADMIN, "/admin/user/search", ImmutableMap.builder() .put("role", UserRole.USER.name()) + .put("1", TEST_ADMIN) .build()) .andExpect(status().isOk()); PagingResponse adminUsers = requestTestFixture.extractJsonResponse(result, new TypeReference>() { }); @@ -332,7 +334,10 @@ public void testUserEditorRights() throws Exception { ResultActions rightsSearchResult =requestTestFixture .getSignedRequest(TEST_ADMIN, "/admin/user/search", ImmutableMap.builder() - .put("editorRightsOn", key.toString()).build()) + .put("editorRightsOn", key.toString()) + .put("role", UserRoles.USER_ROLE) + .put("q", USERNAME) + .build()) .andExpect(status().isOk()); PagingResponse editorUsers = requestTestFixture.extractJsonResponse(rightsSearchResult, new TypeReference>() { }); assertTrue(editorUsers.getCount() == 1); diff --git a/registry-mail/pom.xml b/registry-mail/pom.xml index fed0297f2e..065ce119cb 100644 --- a/registry-mail/pom.xml +++ b/registry-mail/pom.xml @@ -3,7 +3,7 @@ registry-parent org.gbif.registry - 3.59-SNAPSHOT + 3.60-SNAPSHOT 4.0.0 diff --git a/registry-messaging/pom.xml b/registry-messaging/pom.xml index b1fe756fc2..45d9294970 100644 --- a/registry-messaging/pom.xml +++ b/registry-messaging/pom.xml @@ -3,7 +3,7 @@ registry-parent org.gbif.registry - 3.59-SNAPSHOT + 3.60-SNAPSHOT 4.0.0 diff --git a/registry-metadata/pom.xml b/registry-metadata/pom.xml index eb09c2ac04..b58ed6d503 100644 --- a/registry-metadata/pom.xml +++ b/registry-metadata/pom.xml @@ -3,7 +3,7 @@ registry-parent org.gbif.registry - 3.59-SNAPSHOT + 3.60-SNAPSHOT 4.0.0 diff --git a/registry-metasync/pom.xml b/registry-metasync/pom.xml index df60d8d075..7e45f97a0f 100644 --- a/registry-metasync/pom.xml +++ b/registry-metasync/pom.xml @@ -3,7 +3,7 @@ registry-parent org.gbif.registry - 3.59-SNAPSHOT + 3.60-SNAPSHOT 4.0.0 diff --git a/registry-oaipmh/pom.xml b/registry-oaipmh/pom.xml index 8db78d9bd2..f27e24c448 100644 --- a/registry-oaipmh/pom.xml +++ b/registry-oaipmh/pom.xml @@ -3,7 +3,7 @@ registry-parent org.gbif.registry - 3.59-SNAPSHOT + 3.60-SNAPSHOT 4.0.0 diff --git a/registry-persistence/pom.xml b/registry-persistence/pom.xml index 611dc9cf92..db1e38fdff 100644 --- a/registry-persistence/pom.xml +++ b/registry-persistence/pom.xml @@ -3,7 +3,7 @@ registry-parent org.gbif.registry - 3.59-SNAPSHOT + 3.60-SNAPSHOT 4.0.0 diff --git a/registry-persistence/src/main/resources/org/gbif/registry/persistence/mapper/UserMapper.xml b/registry-persistence/src/main/resources/org/gbif/registry/persistence/mapper/UserMapper.xml index 214624379c..2f624ce1a5 100644 --- a/registry-persistence/src/main/resources/org/gbif/registry/persistence/mapper/UserMapper.xml +++ b/registry-persistence/src/main/resources/org/gbif/registry/persistence/mapper/UserMapper.xml @@ -59,8 +59,7 @@ - WHERE - u.last_name ILIKE '%' || #{query} || '%' OR + u.last_name ILIKE '%' || #{query} || '%' OR u.first_name ILIKE '%' || #{query} || '%' OR u.email ILIKE '%' || #{query} || '%' OR u.username ILIKE '%' || #{query} || '%' @@ -75,10 +74,12 @@ #{item} - - WHERE roles @> #{roles,jdbcType=OTHER,typeHandler=org.gbif.registry.persistence.mapper.handler.UserRoleTypeHandler} - - + + + + AND roles @> #{roles,jdbcType=OTHER,typeHandler=org.gbif.registry.persistence.mapper.handler.UserRoleTypeHandler} + + ORDER BY u.last_name, u.first_name, u.username LIMIT #{page.limit} OFFSET #{page.offset} @@ -87,15 +88,18 @@ diff --git a/registry-pipelines/pom.xml b/registry-pipelines/pom.xml index 50763cf303..c65021bc49 100644 --- a/registry-pipelines/pom.xml +++ b/registry-pipelines/pom.xml @@ -3,7 +3,7 @@ registry-parent org.gbif.registry - 3.59-SNAPSHOT + 3.60-SNAPSHOT 4.0.0 diff --git a/registry-search/pom.xml b/registry-search/pom.xml index dfa57309ce..6f5dc569a5 100644 --- a/registry-search/pom.xml +++ b/registry-search/pom.xml @@ -3,7 +3,7 @@ registry-parent org.gbif.registry - 3.59-SNAPSHOT + 3.60-SNAPSHOT 4.0.0 diff --git a/registry-security/pom.xml b/registry-security/pom.xml index ab32890522..52bba08780 100644 --- a/registry-security/pom.xml +++ b/registry-security/pom.xml @@ -3,7 +3,7 @@ registry-parent org.gbif.registry - 3.59-SNAPSHOT + 3.60-SNAPSHOT 4.0.0 diff --git a/registry-service/pom.xml b/registry-service/pom.xml index 4189935868..f83f11e592 100644 --- a/registry-service/pom.xml +++ b/registry-service/pom.xml @@ -3,7 +3,7 @@ registry-parent org.gbif.registry - 3.59-SNAPSHOT + 3.60-SNAPSHOT 4.0.0 diff --git a/registry-surety/pom.xml b/registry-surety/pom.xml index 9fb0ace67d..6ff943da89 100644 --- a/registry-surety/pom.xml +++ b/registry-surety/pom.xml @@ -3,7 +3,7 @@ registry-parent org.gbif.registry - 3.59-SNAPSHOT + 3.60-SNAPSHOT 4.0.0 diff --git a/registry-ws-client/pom.xml b/registry-ws-client/pom.xml index d5205b66ec..d03b320feb 100644 --- a/registry-ws-client/pom.xml +++ b/registry-ws-client/pom.xml @@ -3,7 +3,7 @@ registry-parent org.gbif.registry - 3.59-SNAPSHOT + 3.60-SNAPSHOT 4.0.0 diff --git a/registry-ws/pom.xml b/registry-ws/pom.xml index 376f13202c..3d9d814c96 100644 --- a/registry-ws/pom.xml +++ b/registry-ws/pom.xml @@ -4,7 +4,7 @@ org.gbif.registry registry-parent - 3.59-SNAPSHOT + 3.60-SNAPSHOT registry-ws GBIF Registry Webservices @@ -15,7 +15,6 @@ - org.springframework.boot @@ -72,6 +71,10 @@ de.codecentric spring-boot-admin-starter-client + + org.springdoc + springdoc-openapi-ui + org.springframework.cloud spring-cloud-starter-sleuth