diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/SessionUtil.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/SessionUtil.java index 2b9104d..d9b002b 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/SessionUtil.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/SessionUtil.java @@ -17,6 +17,7 @@ import org.gcube.portal.custom.scopemanager.scopehelper.ScopeHelper; import org.gcube.portlets.user.td.gwtservice.server.file.CSVFileUploadSession; import org.gcube.portlets.user.td.gwtservice.server.file.CodelistMappingFileUploadSession; import org.gcube.portlets.user.td.gwtservice.server.trservice.TRTasksManager; +import org.gcube.portlets.user.td.gwtservice.shared.Constants; import org.gcube.portlets.user.td.gwtservice.shared.chart.ChartTopRatingSession; import org.gcube.portlets.user.td.gwtservice.shared.codelisthelper.CodelistMappingSession; import org.gcube.portlets.user.td.gwtservice.shared.csv.CSVExportSession; @@ -89,8 +90,8 @@ public class SessionUtil { ASLSession session; if (username == null) { logger.warn("no user found in session, using test one"); - throw new TDGWTSessionExpiredException("Session Expired!"); - /* + /*throw new TDGWTSessionExpiredException("Session Expired!");*/ + // Remove comment for Test username = Constants.DEFAULT_USER; String scope = Constants.DEFAULT_SCOPE; @@ -99,7 +100,7 @@ public class SessionUtil { session = SessionManager.getInstance().getASLSession( httpSession.getId(), username); session.setScope(scope); - */ + } else { session = SessionManager.getInstance().getASLSession( httpSession.getId(), username); diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/rule/RuleDescriptionData.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/rule/RuleDescriptionData.java index 8459552..1e10841 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/rule/RuleDescriptionData.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/rule/RuleDescriptionData.java @@ -104,6 +104,15 @@ public class RuleDescriptionData implements Serializable { public void setContacts(ArrayList contacts) { this.contacts = contacts; } + + public ArrayList getContactsAsStringList(){ + ArrayList contactsList=new ArrayList(); + for(Contacts contact:contacts){ + contactsList.add(contact.getLogin()); + } + return contactsList; + } + public RuleScopeType getScope() { return scope;