bug fixed on recovering users from usermanager
git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace-tree-widget@82301 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
3574960c4e
commit
dbf751f6d4
2
pom.xml
2
pom.xml
|
@ -142,7 +142,7 @@
|
|||
<dependency>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
<scope>provided</scope>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
|
|
|
@ -1574,9 +1574,14 @@ public class GWTWorkspaceBuilder {
|
|||
|
||||
List<InfoContactModel> listContactsModel = new ArrayList<InfoContactModel>();
|
||||
|
||||
if(listUsers==null)
|
||||
return listContactsModel;
|
||||
|
||||
logger.trace("List<UserModel> size returned from Portal is: "+ listUsers.size());
|
||||
|
||||
logger.trace("Building list contact model list user model");
|
||||
for (UserModel userModel : listUsers) {
|
||||
String fullName = UserUtil.getUserFullName(userModel.getFullname());
|
||||
String fullName = userModel.getFullname();
|
||||
|
||||
if(fullName!=null && !fullName.isEmpty())
|
||||
listContactsModel.add(new InfoContactModel(userModel.getUserId()+"", userModel.getScreenName(), fullName));
|
||||
|
|
|
@ -2337,8 +2337,11 @@ public class GWTWorkspaceServiceImpl extends RemoteServiceServlet implements GWT
|
|||
workspaceLogger.trace("workspace session validating...");
|
||||
//READING USERNAME FROM ASL SESSION
|
||||
String userUsername = WsUtil.getAslSession(this.getThreadLocalRequest().getSession()).getUsername();
|
||||
boolean isTestUser = userUsername.compareTo(WsUtil.TEST_USER)==0;
|
||||
|
||||
if(userUsername.compareTo(WsUtil.TEST_USER)==0 && !isTestMode()){
|
||||
workspaceLogger.trace("is valid user: "+isTestUser + " is test mode: "+isTestMode());
|
||||
|
||||
if(isTestUser && !isTestMode()){
|
||||
workspaceLogger.error("workspace session is expired! username is: "+WsUtil.TEST_USER);
|
||||
return true; //is TEST_USER, session is expired
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue