ref 13226:StorageHub - Update workspace-sharing-widget to SH
https://support.d4science.org/issues/13226 Fixed share folder with multiple users git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/widgets/workspace-sharing-widget@179301 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
22fcb1a056
commit
258abab472
|
@ -283,8 +283,7 @@ public class GWTWorkspaceSharingBuilder {
|
|||
return listContactsModel;
|
||||
}
|
||||
|
||||
public List<InfoContactModel> searchUsersFromKeyword(PortalContextInfo info, String keyword)
|
||||
throws Exception {
|
||||
public List<InfoContactModel> searchUsersFromKeyword(PortalContextInfo info, String keyword) throws Exception {
|
||||
try {
|
||||
logger.debug("Search Keyword: " + keyword);
|
||||
List<InfoContactModel> listInfoContactModel = new ArrayList<>();
|
||||
|
@ -311,10 +310,15 @@ public class GWTWorkspaceSharingBuilder {
|
|||
* @return the list
|
||||
*/
|
||||
public List<InfoContactModel> buildGxtInfoContactsFromPortalLogins(List<String> listPortalLogin) {
|
||||
|
||||
List<InfoContactModel> listContact = new ArrayList<InfoContactModel>();
|
||||
for (String portalLogin : listPortalLogin)
|
||||
listContact.add(buildGxtInfoContactFromPortalLogin(portalLogin));
|
||||
|
||||
try {
|
||||
for (String portalLogin : listPortalLogin) {
|
||||
listContact.add(buildGxtInfoContactFromPortalLogin(portalLogin));
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("Error in build list of contacts from portal logins: " + e.getMessage(), e);
|
||||
}
|
||||
|
||||
return listContact;
|
||||
}
|
||||
|
@ -338,29 +342,29 @@ public class GWTWorkspaceSharingBuilder {
|
|||
/**
|
||||
* Builds the gxt info contact from portal group.
|
||||
*
|
||||
* @param grouoLogin
|
||||
* @param groupLogin
|
||||
* the grouo login
|
||||
* @return the info contact model
|
||||
*/
|
||||
protected InfoContactModel buildGxtInfoContactFromPortalGroup(String grouoLogin) {
|
||||
protected InfoContactModel buildGxtInfoContactFromPortalGroup(String groupLogin) {
|
||||
|
||||
String groupName = "";
|
||||
if (grouoLogin == null) {
|
||||
if (groupLogin == null) {
|
||||
logger.warn("GroupLogin is null, return empty");
|
||||
grouoLogin = "";
|
||||
groupLogin = "";
|
||||
}
|
||||
|
||||
// RECOVERING VRE NAME
|
||||
if (grouoLogin.contains("/")) {
|
||||
int start = grouoLogin.lastIndexOf("/");
|
||||
int end = grouoLogin.length();
|
||||
if (groupLogin.contains("/")) {
|
||||
int start = groupLogin.lastIndexOf("/");
|
||||
int end = groupLogin.length();
|
||||
if (start < end)
|
||||
groupName = grouoLogin.substring(start + 1, end);
|
||||
groupName = groupLogin.substring(start + 1, end);
|
||||
else
|
||||
groupName = grouoLogin;
|
||||
groupName = groupLogin;
|
||||
}
|
||||
|
||||
return new InfoContactModel(grouoLogin, grouoLogin, groupName, true);
|
||||
return new InfoContactModel(groupLogin, groupLogin, groupName, true);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue