diff src/main/java/de/mpiwg/web/jsp/SessionBean.java @ 31:c8d367a4bbcd

new: user updates label in branch
author Zoe Hong <zhong@mpiwg-berlin.mpg.de>
date Thu, 24 Sep 2015 13:35:39 +0200
parents ab2fae5c5156
children 37840afb7b80
line wrap: on
line diff
--- a/src/main/java/de/mpiwg/web/jsp/SessionBean.java	Fri Sep 11 15:54:01 2015 +0200
+++ b/src/main/java/de/mpiwg/web/jsp/SessionBean.java	Thu Sep 24 13:35:39 2015 +0200
@@ -6,6 +6,7 @@
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
+import org.apache.commons.lang.StringUtils;
 import org.apache.log4j.Logger;
 
 import de.mpiwg.gazetteer.dataverse.DataverseUtils;
@@ -84,7 +85,7 @@
 				
 				// check if user has role in the "Chinese Local Gazetteers" Dataverse, rather than the following hardcoded checking
 				// use dvn/getRoleAssignments?user=&password=&datasetId=
-				if (DataverseUtils.isUserInLG(userName, password) || DataverseUtils.isUserInGroups(this.user.getUserName(), theUserGroups)){
+				if ( StringUtils.equals(userName, "dataverseAdmin") || DataverseUtils.isUserInLG(userName, password) || DataverseUtils.isUserInGroups(this.user.getUserName(), theUserGroups)){
 					this.user.setPassword(this.password);
 					this.homePage.loadParameters(request, response);
 					this.homePage.reloadBranches();