Compare commits
2 Commits
Author | SHA1 | Date |
---|---|---|
Massimiliano Assante | ff83d9a603 | |
Massimiliano Assante | 45ed9ba636 |
|
@ -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] - 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
|
|
@ -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);
|
|
@ -1,9 +0,0 @@
|
||||||
<ReleaseNotes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xsi:noNamespaceSchemaLocation="xsd/changelog.xsd">
|
|
||||||
<Changeset component="org.gcube.portal.landing-page-library.1-3-1" date="2020-04-21">
|
|
||||||
<Change>Fix for Bug #19138, landing page hook register VRE users automatically if a vhost is associated to the VRE</Change>
|
|
||||||
</Changeset>
|
|
||||||
<Changeset component="org.gcube.portal.landing-page-library.1-0-0" date="2016-06-22">
|
|
||||||
<Change>First Release</Change>
|
|
||||||
</Changeset>
|
|
||||||
</ReleaseNotes>
|
|
|
@ -1,42 +0,0 @@
|
||||||
<assembly
|
|
||||||
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
|
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
|
|
||||||
<id>servicearchive</id>
|
|
||||||
<formats>
|
|
||||||
<format>tar.gz</format>
|
|
||||||
</formats>
|
|
||||||
<baseDirectory>/</baseDirectory>
|
|
||||||
<fileSets>
|
|
||||||
<fileSet>
|
|
||||||
<directory>${distroDirectory}</directory>
|
|
||||||
<outputDirectory>/</outputDirectory>
|
|
||||||
<useDefaultExcludes>true</useDefaultExcludes>
|
|
||||||
<includes>
|
|
||||||
<include>README</include>
|
|
||||||
<include>LICENSE</include>
|
|
||||||
<include>changelog.xml</include>
|
|
||||||
<include>profile.xml</include>
|
|
||||||
</includes>
|
|
||||||
<fileMode>755</fileMode>
|
|
||||||
<filtered>true</filtered>
|
|
||||||
</fileSet>
|
|
||||||
<fileSet>
|
|
||||||
<directory>target/apidocs</directory>
|
|
||||||
<outputDirectory>/${artifactId}/doc/api</outputDirectory>
|
|
||||||
<useDefaultExcludes>true</useDefaultExcludes>
|
|
||||||
<fileMode>755</fileMode>
|
|
||||||
</fileSet>
|
|
||||||
</fileSets>
|
|
||||||
<files>
|
|
||||||
<file>
|
|
||||||
<source>${distroDirectory}/profile.xml</source>
|
|
||||||
<outputDirectory>./</outputDirectory>
|
|
||||||
<filtered>true</filtered>
|
|
||||||
</file>
|
|
||||||
<file>
|
|
||||||
<source>target/${build.finalName}.jar</source>
|
|
||||||
<outputDirectory>/${artifactId}</outputDirectory>
|
|
||||||
</file>
|
|
||||||
</files>
|
|
||||||
</assembly>
|
|
|
@ -1,25 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<Resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
|
||||||
<ID></ID>
|
|
||||||
<Type>Library</Type>
|
|
||||||
<Profile>
|
|
||||||
<Description>${description}</Description>
|
|
||||||
<Class>Portal</Class>
|
|
||||||
<Name>${artifactId}</Name>
|
|
||||||
<Version>1.0.0</Version>
|
|
||||||
<Packages>
|
|
||||||
<Software>
|
|
||||||
<Name>${artifactId}</Name>
|
|
||||||
<Version>${version}</Version>
|
|
||||||
<MavenCoordinates>
|
|
||||||
<groupId>${groupId}</groupId>
|
|
||||||
<artifactId>${artifactId}</artifactId>
|
|
||||||
<version>${version}</version>
|
|
||||||
</MavenCoordinates>
|
|
||||||
<Files>
|
|
||||||
<File>${build.finalName}.jar</File>
|
|
||||||
</Files>
|
|
||||||
</Software>
|
|
||||||
</Packages>
|
|
||||||
</Profile>
|
|
||||||
</Resource>
|
|
2
pom.xml
2
pom.xml
|
@ -10,7 +10,7 @@
|
||||||
</parent>
|
</parent>
|
||||||
<groupId>org.gcube.portal</groupId>
|
<groupId>org.gcube.portal</groupId>
|
||||||
<artifactId>landing-page-library</artifactId>
|
<artifactId>landing-page-library</artifactId>
|
||||||
<version>1.3.1</version>
|
<version>1.4.0</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
<scm>
|
<scm>
|
||||||
<connection>scm:git:https://code-repo.d4science.org/gCubeSystem/${project.artifactId}.git</connection>
|
<connection>scm:git:https://code-repo.d4science.org/gCubeSystem/${project.artifactId}.git</connection>
|
||||||
|
|
|
@ -22,11 +22,9 @@ import com.liferay.portal.service.GroupLocalServiceUtil;
|
||||||
public class ResourceCatalogueAndSBDLabRegistrationThread implements Runnable {
|
public class ResourceCatalogueAndSBDLabRegistrationThread implements Runnable {
|
||||||
private static Logger _log = LoggerFactory.getLogger(ResourceCatalogueAndSBDLabRegistrationThread.class);
|
private static Logger _log = LoggerFactory.getLogger(ResourceCatalogueAndSBDLabRegistrationThread.class);
|
||||||
private static long RESOURCE_CATALOGUE_GROUPID = 459909;
|
private static long RESOURCE_CATALOGUE_GROUPID = 459909;
|
||||||
private static long SOBIGDATA_LAB_GROUPID = 20371853;
|
|
||||||
|
|
||||||
private User user;
|
private User user;
|
||||||
private Group resourceCatalogueGroup;
|
private Group resourceCatalogueGroup;
|
||||||
private Group soBigDataLabGroup;
|
|
||||||
private String siteURL;
|
private String siteURL;
|
||||||
List<Group> userSites;
|
List<Group> userSites;
|
||||||
UserManager um;
|
UserManager um;
|
||||||
|
@ -39,7 +37,6 @@ public class ResourceCatalogueAndSBDLabRegistrationThread implements Runnable {
|
||||||
um = new LiferayUserManager();
|
um = new LiferayUserManager();
|
||||||
try {
|
try {
|
||||||
resourceCatalogueGroup = GroupLocalServiceUtil.getGroup(RESOURCE_CATALOGUE_GROUPID);
|
resourceCatalogueGroup = GroupLocalServiceUtil.getGroup(RESOURCE_CATALOGUE_GROUPID);
|
||||||
soBigDataLabGroup = GroupLocalServiceUtil.getGroup(SOBIGDATA_LAB_GROUPID);
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
@ -48,7 +45,7 @@ public class ResourceCatalogueAndSBDLabRegistrationThread implements Runnable {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
boolean isRegisteredRC = false;
|
boolean isRegisteredRC = false;
|
||||||
boolean isRegisteredLAB = false;
|
|
||||||
for (Group group : userSites) {
|
for (Group group : userSites) {
|
||||||
if (group.getGroupId() == resourceCatalogueGroup.getGroupId()) {
|
if (group.getGroupId() == resourceCatalogueGroup.getGroupId()) {
|
||||||
isRegisteredRC = true;
|
isRegisteredRC = true;
|
||||||
|
@ -65,28 +62,6 @@ public class ResourceCatalogueAndSBDLabRegistrationThread implements Runnable {
|
||||||
e.printStackTrace();
|
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();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue