diff --git a/README.md b/README.md index 31c6305f27177ceacdcaa658e4de37966cbdabe2..ca093b5e420fb99aa8a3a2c56b7886416565333a 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,17 @@ To run: docker run --env-file docker-env -d -p 8081:8081 -i -t gms:latest +## Command line clients + +To add a command line client first generate the sha256 of its password: + + echo -n password | sha256sum + +Then insert the client line into the database: + + INSERT INTO gms_client (client_id, client_secret, allowed_actions, ip_filter) + VALUES ('test', '9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08', '{"*"}', NULL); + ## Developer notes Backend and frontend are 2 separate applications: diff --git a/gms-client/gms-cli/gms.properties b/gms-client/gms-cli/gms.properties index a299861f66b89d637fcbec2c1087050b9bc4250f..846a8033d5dfe8215f7d6023be5da9301501501e 100644 --- a/gms-client/gms-cli/gms.properties +++ b/gms-client/gms-cli/gms.properties @@ -1,3 +1,6 @@ -base_url=http://localhost:8081/gms -client_id=test -client_secret=test +#base_url=http://localhost:8081/gms +#client_id=test +#client_secret=test +base_url=https://sso.ia2.inaf.it/gms +client_id=sso-admin +client_secret=cXjbauYe8g diff --git a/gms-ui/src/store.js b/gms-ui/src/store.js index ff7e99d28b60b7486712278cd8af637b8d258eb3..0a44fd6c5430410cd38888ef953a7ac53e908b1f 100644 --- a/gms-ui/src/store.js +++ b/gms-ui/src/store.js @@ -71,12 +71,15 @@ export default new Vuex.Store({ }, updateGroupsPanel(state, groupsPanel) { this.state.model.groupsPanel = groupsPanel; + this.state.input.paginatorPage = groupsPanel.currentPage; }, updatePermissionsPanel(state, permissionsPanel) { this.state.model.permissionsPanel = permissionsPanel; + this.state.input.paginatorPage = permissionsPanel.currentPage; }, updateMembersPanel(state, membersPanel) { this.state.model.membersPanel = membersPanel; + this.state.input.paginatorPage = membersPanel.currentPage; }, setTabIndex(state, tabIndex) { // this will trigger the tabChanged() method in Main.vue diff --git a/gms/pom.xml b/gms/pom.xml index ae112f7a3fe550c0638370828026a8a37666dc0a..fb2694e6376b74c0abba55d12bb83f35d8709a23 100644 --- a/gms/pom.xml +++ b/gms/pom.xml @@ -122,6 +122,9 @@ <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> + <configuration> + <executable>true</executable> + </configuration> </plugin> </plugins> </build> diff --git a/gms/src/test/java/it/inaf/ia2/gms/service/SearchServiceTest.java b/gms/src/test/java/it/inaf/ia2/gms/service/SearchServiceTest.java index 56d0d9cd39bb4e9ead2f4a700235418723a9e231..b3ba18ce4ace7c2a5160c9a0b8a2b5cd748d6587 100644 --- a/gms/src/test/java/it/inaf/ia2/gms/service/SearchServiceTest.java +++ b/gms/src/test/java/it/inaf/ia2/gms/service/SearchServiceTest.java @@ -86,6 +86,7 @@ public class SearchServiceTest { identity.setPrimary(true); identity.setType(IdentityType.EDU_GAIN); identity.setEmail("user@inaf.it"); + identity.setTypedId("user@inaf.it"); user.setIdentities(Collections.singletonList(identity)); when(rapClient.searchUsers(any())).thenReturn(Collections.singletonList(user)); @@ -125,7 +126,7 @@ public class SearchServiceTest { SearchResponseItem item1 = response.getItems().get(1); assertEquals(SearchResponseType.USER, item1.getType()); assertEquals("user_id", item1.getId()); - assertEquals("user@inaf.it (EduGAIN)", item1.getLabel()); + assertEquals("user@inaf.it (eduGAIN)", item1.getLabel()); } @Test