[Ils-source] r1446 - trunk/webapp/api/ccure/user/put

scribe at crosswire.org scribe at crosswire.org
Thu Apr 21 16:19:51 MST 2016


Author: scribe
Date: 2016-04-21 16:19:51 -0700 (Thu, 21 Apr 2016)
New Revision: 1446

Modified:
   trunk/webapp/api/ccure/user/put/index.jsp
Log:
added recognition of 4 different ways to send us ROLE :(


Modified: trunk/webapp/api/ccure/user/put/index.jsp
===================================================================
--- trunk/webapp/api/ccure/user/put/index.jsp	2016-04-21 15:17:51 UTC (rev 1445)
+++ trunk/webapp/api/ccure/user/put/index.jsp	2016-04-21 23:19:51 UTC (rev 1446)
@@ -43,6 +43,9 @@
 	}
 	// end standard service header -----------------------------------
 
+	UserProfile adminUser = ilsSession.getCurrentUserProfile();
+	ilsSession.setCachedCurrentUserProfile(adminUser);
+
 	String data = request.getParameter("data");
 	if (data != null) {
 	data = data.trim();
@@ -79,7 +82,7 @@
 logger.debug("char 2: " + data.charAt(2));
 */
 
-	eventsLogger.debug("CCURE user/put: data: " + data);
+	eventsLogger.info("CCURE user/put: data: " + data);
 	XMLBlock doc = null;
 	XMLBlock records[] = null;
 	++errCode;
@@ -141,8 +144,6 @@
 		++errCode;
 	if (userProfileID != -1 || loginID != null || userData != null) {
 
-		UserProfile adminUser = ilsSession.getCurrentUserProfile();
-
 		String statusMsg      = "";
 		SimpleDateFormat df   = new SimpleDateFormat("MM/dd/yyyy");
 		UserProfile current   = new UserProfile();
@@ -212,6 +213,9 @@
 
 		boolean createGroupOnDemand = true; //false; try { createGroupOnDemand = "true".equals(request.getParameter("createGroupOnDemand")); } catch (Exception e) {}
 		val = record.getValue("UDF__ROLE_");
+		if (val == null || val.length() == 0) val = record.getValue("UDF__CECIL_ROLE_");
+		if (val == null || val.length() == 0) val = record.getValue("UDF__JAXEX_ROLE_");
+		if (val == null || val.length() == 0) val = record.getValue("UDF__JIA_ROLE_");
 		String val2 = request.getParameter("roleUserData");
 		int requestedRole = -1;
 




More information about the Ils-source mailing list