From 45ed9ba6360f7080b9c6560ab00de370f8b45cd3 Mon Sep 17 00:00:00 2001 From: Massimiliano Assante Date: Thu, 7 Jan 2021 11:33:10 +0100 Subject: [PATCH] Feature #20395 Remove user automatic registration to SoBigDataLab VRE --- CHANGELOG.md | 20 +++++++++ FUNDING.md | 26 ++++++++++++ distro/changelog.xml | 9 ---- distro/descriptor.xml | 42 ------------------- distro/profile.xml | 25 ----------- pom.xml | 2 +- ...eCatalogueAndSBDLabRegistrationThread.java | 29 +------------ 7 files changed, 49 insertions(+), 104 deletions(-) create mode 100644 CHANGELOG.md create mode 100644 FUNDING.md delete mode 100644 distro/changelog.xml delete mode 100644 distro/descriptor.xml delete mode 100644 distro/profile.xml diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..de81e74 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,20 @@ + +# Changelog for landing-page-library + +All notable changes to this project will be documented in this file. +This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + + +## [v1.4.0-SNAPSHOT] - 2021-01-07 + +Feature #20395 - Remove user automatic registration to SoBigDataLab VRE from landing-page hook + +## [v1.3.1] - 2020-04-21 + +Fix for Bug #19138, landing page hook register VRE users automatically if a vhost is associated to the VRE + +Ported to git + +## [v1.0.0] - 2016-06-22 + +First release diff --git a/FUNDING.md b/FUNDING.md new file mode 100644 index 0000000..6fa9eac --- /dev/null +++ b/FUNDING.md @@ -0,0 +1,26 @@ +# Acknowledgments + +The projects leading to this software have received funding from a series of European Union programmes including: + +- the Sixth Framework Programme for Research and Technological Development + - [DILIGENT](https://cordis.europa.eu/project/id/004260) (grant no. 004260). +- the Seventh Framework Programme for research, technological development and demonstration + - [D4Science](https://cordis.europa.eu/project/id/212488) (grant no. 212488); + - [D4Science-II](https://cordis.europa.eu/project/id/239019) (grant no.239019); + - [ENVRI](https://cordis.europa.eu/project/id/283465) (grant no. 283465); + - [iMarine](https://cordis.europa.eu/project/id/283644) (grant no. 283644); + - [EUBrazilOpenBio](https://cordis.europa.eu/project/id/288754) (grant no. 288754). +- the H2020 research and innovation programme + - [SoBigData](https://cordis.europa.eu/project/id/654024) (grant no. 654024); + - [PARTHENOS](https://cordis.europa.eu/project/id/654119) (grant no. 654119); + - [EGI-Engage](https://cordis.europa.eu/project/id/654142) (grant no. 654142); + - [ENVRI PLUS](https://cordis.europa.eu/project/id/654182) (grant no. 654182); + - [BlueBRIDGE](https://cordis.europa.eu/project/id/675680) (grant no. 675680); + - [PerformFISH](https://cordis.europa.eu/project/id/727610) (grant no. 727610); + - [AGINFRA PLUS](https://cordis.europa.eu/project/id/731001) (grant no. 731001); + - [DESIRA](https://cordis.europa.eu/project/id/818194) (grant no. 818194); + - [ARIADNEplus](https://cordis.europa.eu/project/id/823914) (grant no. 823914); + - [RISIS 2](https://cordis.europa.eu/project/id/824091) (grant no. 824091); + - [EOSC-Pillar](https://cordis.europa.eu/project/id/857650) (grant no. 857650); + - [Blue Cloud](https://cordis.europa.eu/project/id/862409) (grant no. 862409); + - [SoBigData-PlusPlus](https://cordis.europa.eu/project/id/871042) (grant no. 871042); \ No newline at end of file diff --git a/distro/changelog.xml b/distro/changelog.xml deleted file mode 100644 index 5522507..0000000 --- a/distro/changelog.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - Fix for Bug #19138, landing page hook register VRE users automatically if a vhost is associated to the VRE - - - First Release - - \ No newline at end of file diff --git a/distro/descriptor.xml b/distro/descriptor.xml deleted file mode 100644 index f75b5e9..0000000 --- a/distro/descriptor.xml +++ /dev/null @@ -1,42 +0,0 @@ - - servicearchive - - tar.gz - - / - - - ${distroDirectory} - / - true - - README - LICENSE - changelog.xml - profile.xml - - 755 - true - - - target/apidocs - /${artifactId}/doc/api - true - 755 - - - - - ${distroDirectory}/profile.xml - ./ - true - - - target/${build.finalName}.jar - /${artifactId} - - - \ No newline at end of file diff --git a/distro/profile.xml b/distro/profile.xml deleted file mode 100644 index 3a8d912..0000000 --- a/distro/profile.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - Library - - ${description} - Portal - ${artifactId} - 1.0.0 - - - ${artifactId} - ${version} - - ${groupId} - ${artifactId} - ${version} - - - ${build.finalName}.jar - - - - - diff --git a/pom.xml b/pom.xml index 94fd170..759e6d5 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ org.gcube.portal landing-page-library - 1.3.1 + 1.4.0-SNAPSHOT jar scm:git:https://code-repo.d4science.org/gCubeSystem/${project.artifactId}.git diff --git a/src/main/java/org/gcube/portal/landingpage/ResourceCatalogueAndSBDLabRegistrationThread.java b/src/main/java/org/gcube/portal/landingpage/ResourceCatalogueAndSBDLabRegistrationThread.java index d376259..dd92500 100644 --- a/src/main/java/org/gcube/portal/landingpage/ResourceCatalogueAndSBDLabRegistrationThread.java +++ b/src/main/java/org/gcube/portal/landingpage/ResourceCatalogueAndSBDLabRegistrationThread.java @@ -22,11 +22,9 @@ import com.liferay.portal.service.GroupLocalServiceUtil; public class ResourceCatalogueAndSBDLabRegistrationThread implements Runnable { private static Logger _log = LoggerFactory.getLogger(ResourceCatalogueAndSBDLabRegistrationThread.class); private static long RESOURCE_CATALOGUE_GROUPID = 459909; - private static long SOBIGDATA_LAB_GROUPID = 20371853; - + private User user; private Group resourceCatalogueGroup; - private Group soBigDataLabGroup; private String siteURL; List userSites; UserManager um; @@ -39,7 +37,6 @@ public class ResourceCatalogueAndSBDLabRegistrationThread implements Runnable { um = new LiferayUserManager(); try { resourceCatalogueGroup = GroupLocalServiceUtil.getGroup(RESOURCE_CATALOGUE_GROUPID); - soBigDataLabGroup = GroupLocalServiceUtil.getGroup(SOBIGDATA_LAB_GROUPID); } catch (Exception e) { e.printStackTrace(); } @@ -48,7 +45,7 @@ public class ResourceCatalogueAndSBDLabRegistrationThread implements Runnable { @Override public void run() { boolean isRegisteredRC = false; - boolean isRegisteredLAB = false; + for (Group group : userSites) { if (group.getGroupId() == resourceCatalogueGroup.getGroupId()) { isRegisteredRC = true; @@ -65,28 +62,6 @@ public class ResourceCatalogueAndSBDLabRegistrationThread implements Runnable { e.printStackTrace(); } } - try { - Thread.sleep(3000); - _log.info("SBD Hook checking the VRE " + soBigDataLabGroup.getName()); - } catch (InterruptedException e1) { - e1.printStackTrace(); - } - for (Group group : userSites) { - if (group.getGroupId() == soBigDataLabGroup.getGroupId()) { - isRegisteredLAB = true; - _log.debug("user " + user.getFullName() + " is already registered to the VRE " + soBigDataLabGroup.getName()); - break; - } - } - if (!isRegisteredLAB) { - try { - _log.info("SBD Hook " + user.getFullName() + " going to be registered to the VRE " + soBigDataLabGroup.getName()); - registerUserToVRE(user, soBigDataLabGroup, siteURL); - } catch (SystemException e) { - _log.error("Could not register to "+ soBigDataLabGroup.getName()); - e.printStackTrace(); - } - } } /**