diff --git a/pom.xml b/pom.xml
index 3dcffa0..499b709 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,6 +23,7 @@
http://svn.d4science.research-infrastructures.eu/gcube/trunk/vo-mamangement/usermanagement-core
+ 6.2.5
distro
1.7
1.7
@@ -59,7 +60,7 @@
com.liferay.portal
portal-service
- 6.2.5
+ ${liferay.version}
junit
diff --git a/src/main/java/org/gcube/vomanagement/usermanagement/impl/LiferayRoleManager.java b/src/main/java/org/gcube/vomanagement/usermanagement/impl/LiferayRoleManager.java
index eb8bade..65334d4 100644
--- a/src/main/java/org/gcube/vomanagement/usermanagement/impl/LiferayRoleManager.java
+++ b/src/main/java/org/gcube/vomanagement/usermanagement/impl/LiferayRoleManager.java
@@ -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");
}
diff --git a/src/main/java/org/gcube/vomanagement/usermanagement/impl/LiferayUserManager.java b/src/main/java/org/gcube/vomanagement/usermanagement/impl/LiferayUserManager.java
index d58f888..7635070 100644
--- a/src/main/java/org/gcube/vomanagement/usermanagement/impl/LiferayUserManager.java
+++ b/src/main/java/org/gcube/vomanagement/usermanagement/impl/LiferayUserManager.java
@@ -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();
}