UPDATED distro folder

git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/vo-management/usermanagement-core@125492 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Massimiliano Assante 2016-03-16 16:19:03 +00:00
parent ddc2488b72
commit f76d63bc89
3 changed files with 5 additions and 11 deletions

View File

@ -23,6 +23,7 @@
<url>http://svn.d4science.research-infrastructures.eu/gcube/trunk/vo-mamangement/usermanagement-core</url>
</scm>
<properties>
<liferay.version>6.2.5</liferay.version>
<distroDirectory>distro</distroDirectory>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
@ -59,7 +60,7 @@
<dependency>
<groupId>com.liferay.portal</groupId>
<artifactId>portal-service</artifactId>
<version>6.2.5</version>
<version>${liferay.version}</version>
</dependency>
<dependency>
<groupId>junit</groupId>

View File

@ -112,7 +112,7 @@ public class LiferayRoleManager implements RoleManager {
Role toReturn = RoleLocalServiceUtil.getRole(ManagementUtils.getCompany().getCompanyId(), roleName);
return toReturn.getRoleId();
} catch (PortalException e) {
throw new RoleRetrievalFault("Role not existing");
throw new RoleRetrievalFault("Role not existing: " + roleName);
} catch (SystemException e) {
_log.error("Liferay SystemException");
}

View File

@ -6,9 +6,6 @@ import java.util.List;
import java.util.Locale;
import java.util.Map;
import org.gcube.common.homelibrary.home.HomeLibrary;
import org.gcube.common.homelibrary.home.exceptions.InternalErrorException;
import org.gcube.common.homelibrary.home.workspace.exceptions.ItemNotFoundException;
import org.gcube.vomanagement.usermanagement.GroupManager;
import org.gcube.vomanagement.usermanagement.UserManager;
import org.gcube.vomanagement.usermanagement.exception.GroupRetrievalFault;
@ -71,7 +68,8 @@ public class LiferayUserManager implements UserManager {
try {
role = getRoleById(companyId, RoleConstants.ADMINISTRATOR);
for (final User admin : UserLocalServiceUtil.getRoleUsers(role.getRoleId())) {
return admin;
if (admin.isActive())
return admin;
}
} catch (final Exception e) {
_log.error("Utils::getAdmin Exception", e);
@ -570,7 +568,6 @@ public class LiferayUserManager implements UserManager {
long parentGroupId = gm.getGroup(groupId).getParentGroupId();
UserLocalServiceUtil.addGroupUser(parentGroupId, userId);
UserLocalServiceUtil.addGroupUser(groupId, userId);
//TODO: add the user to the HL Folder
}
} catch (SystemException e) {
e.printStackTrace();
@ -583,10 +580,6 @@ public class LiferayUserManager implements UserManager {
public void dismissUserFromGroup(long groupId, long userId) throws UserManagementSystemException, GroupRetrievalFault, UserRetrievalFault {
try {
UserLocalServiceUtil.deleteGroupUser(groupId, userId);
GroupManager gm = new LiferayGroupManager();
if (gm.isVRE(groupId)) {
//TODO: remove the user to the HL Folder
}
} catch (SystemException e) {
e.printStackTrace();
}