ref 16781:Sharing widget: the set of users loaded should be gateway dependant

https://support.d4science.org/issues/16781

Added users retrieve operation by Gateway

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/widgets/workspace-sharing-widget@179676 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2019-06-05 16:32:01 +00:00
parent 5f4446e7c0
commit 12fd44d136
2 changed files with 6 additions and 6 deletions

View File

@ -255,9 +255,9 @@ public class GWTWorkspaceSharingBuilder {
* Error
*/
public List<InfoContactModel> buildGXTListContactsModelFromUserModel(PortalContextInfo info) throws Exception {
List<GCubeUser> listUsers = UserUtil.getOrganizationUsers(info.getCurrentScope());
List<GCubeUser> listUsers = new LiferayUserManager().listUsersByGroup(info.getCurrGroupId());
if (listUsers == null) {
logger.error("No users found in: " + info.getCurrentScope());
throw new Exception("An error occurred on recovering users from Portal, try again later");

View File

@ -154,14 +154,14 @@ public class WorkspaceSharingServiceImpl extends RemoteServiceServlet implements
}
PortalContextInfo info = WsUtil.getPortalContext(this.getThreadLocalRequest());
GWTWorkspaceSharingBuilder builder = new GWTWorkspaceSharingBuilder();
List<InfoContactModel> listContactsModel = builder.buildGXTListContactsModelFromUserModel(info);
listContactsModel.addAll(builder.getGXTListContactsModelFromVOs(info));
//listContactsModel.addAll(builder.getGXTListContactsModelFromVOs(info));
logger.debug("Get all contacts returning a list having size: " + listContactsModel.size());
logger.debug("Get all Gateway Users returning a list having size: " + listContactsModel.size());
return listContactsModel;
} catch (Exception e) {