From scribe at crosswire.org  Sat Oct  3 13:03:28 2015
From: scribe at crosswire.org (scribe at crosswire.org)
Date: Sat, 03 Oct 2015 13:03:28 -0700
Subject: [Ils-source] r1350 - trunk/db/mssql
Message-ID: <E1ZiT1k-0007Ra-58@crosswire.org>

Author: scribe
Date: 2015-10-03 13:03:27 -0700 (Sat, 03 Oct 2015)
New Revision: 1350

Modified:
   trunk/db/mssql/ilsdb.sql
Log:
updated ilsdb creation script with latest update scripts


Modified: trunk/db/mssql/ilsdb.sql
===================================================================
--- trunk/db/mssql/ilsdb.sql	2015-09-30 18:29:38 UTC (rev 1349)
+++ trunk/db/mssql/ilsdb.sql	2015-10-03 20:03:27 UTC (rev 1350)
@@ -1,5 +1,5 @@
 CREATE TABLE ILSGROUP (COMPANYID INTEGER NOT NULL, ILSGROUPID INTEGER IDENTITY(1,1) NOT NULL, GROUPNAME VARCHAR(75) NOT NULL, GROUPDESC VARCHAR(255), GROUPTYPEID INTEGER, USERDATA VARCHAR(80), CONSTRAINT ILSGROUPPK1 PRIMARY KEY (COMPANYID, ILSGROUPID))
-CREATE TABLE COURSE (COMPANYID INTEGER NOT NULL, COURSID INTEGER IDENTITY(1,1) NOT NULL, COURSNUM VARCHAR(20) NOT NULL, COURSNAME VARCHAR(100), COURSDESC VARCHAR(255), COURSTYPEID INTEGER, COURSPASS INTEGER, COURSPASSEXPDAYS INTEGER, COURSREASBEFDAYS INTEGER, COURSURL VARCHAR(255), COURSCKLISTURL VARCHAR(255), COURSCOST FLOAT, COURSSEATMINS INTEGER, COURSISCURRICULUM CHAR(1), COURSISQUICKVIEW CHAR(1), COURSPOSTDATE DATETIME, COURSISACTIVE CHAR(1), COURSISIPRESTRICTED char(1), COURSREQMGRAPPRVL CHAR(1), USERDATA VARCHAR(80), COURSISCURRICCERT char(1) default 'F', CONSTRAINT COURSEPK1 PRIMARY KEY (COMPANYID, COURSID))
+CREATE TABLE COURSE (COMPANYID INTEGER NOT NULL, COURSID INTEGER IDENTITY(1,1) NOT NULL, COURSNUM VARCHAR(20) NOT NULL, COURSNAME VARCHAR(100), COURSDESC VARCHAR(500), COURSTYPEID INTEGER, COURSPASS INTEGER, COURSPASSEXPDAYS INTEGER, COURSREASBEFDAYS INTEGER, COURSURL VARCHAR(255), COURSCKLISTURL VARCHAR(255), COURSCOST FLOAT, COURSSEATMINS INTEGER, COURSISCURRICULUM CHAR(1), COURSISQUICKVIEW CHAR(1), COURSPOSTDATE DATETIME, COURSISACTIVE CHAR(1), COURSISIPRESTRICTED char(1), COURSREQMGRAPPRVL CHAR(1), USERDATA VARCHAR(80), COURSISCURRICCERT char(1) default 'F', CONSTRAINT COURSEPK1 PRIMARY KEY (COMPANYID, COURSID))
 
 CREATE TABLE USERPROFILE (COMPANYID INTEGER NOT NULL, USERPRID INTEGER IDENTITY(1,1) NOT NULL, USERPRNUM VARCHAR(50) NOT NULL, USERPRPASSWD VARCHAR(20), USERPRMNAME VARCHAR(40), USERPRSNAME VARCHAR(40), USERPRFNAME VARCHAR(40), USERPRLNAME VARCHAR(40), USERPRSTATUSID INTEGER, USERPRADDR1 VARCHAR(60),USERPRADDR2 VARCHAR(60),USERPRCITY VARCHAR(30),USERPRSTATE VARCHAR(2),USERPRZIP VARCHAR(12),USERPRCOUNTRY VARCHAR(50),USERPREMAIL VARCHAR(50), USERPRPHONE VARCHAR(50), USERPREMPTITLEID INTEGER, USERPRLASTLOGIN TIMESTAMP, USERPRACCESSLEVEL INTEGER, USERPRACCESSMOD INTEGER, USERPRINACTDATE DATETIME, USERPRHIREDATE DATETIME, USERPRTERMDATE DATETIME, USERPRIPRESTRICTOVERRIDE char(1), USERDATA VARCHAR(80), USERPRSECONDLOGINOVERRIDE char(1) default 'F', CONSTRAINT USERPROFILEPK1 PRIMARY KEY (COMPANYID, USERPRID))
 CREATE TABLE ANNOUNCEMENT (COMPANYID INTEGER NOT NULL, ANNOUNCID INTEGER IDENTITY(1,1) NOT NULL, ANNOUNCTITLE VARCHAR(100), ANNOUNCMESSAGE VARCHAR(255), ANNOUNCEXP DATETIME, ANNOUNCURL VARCHAR(255), ANNOUNCPOSTDATE DATETIME, USERDATA VARCHAR(80), CONSTRAINT ANNOUNCEMENTPK1 PRIMARY KEY (COMPANYID, ANNOUNCID))
@@ -18,6 +18,9 @@
 CREATE TABLE GROUPTYPE (COMPANYID INTEGER NOT NULL, GROUPTYPEID INTEGER NOT NULL, GROUPTYPENAME VARCHAR(40), GROUPTYPEDESC VARCHAR(80), CONSTRAINT GROUPTYPEPK1 PRIMARY KEY (COMPANYID, GROUPTYPEID))
 CREATE TABLE COURSETYPE (COMPANYID INTEGER NOT NULL, COURSETYPEID INTEGER NOT NULL, COURSETYPENAME VARCHAR(40), COURSETYPEDESC VARCHAR(80), CONSTRAINT COURSETYPEPK1 PRIMARY KEY (COMPANYID, COURSETYPEID))
 CREATE TABLE SECURITYMODE (COMPANYID INTEGER NOT NULL, SECMODDESC VARCHAR(75) NOT NULL, SECMODVAL INTEGER NOT NULL, CONSTRAINT SECURITYMODEPK1 PRIMARY KEY (COMPANYID, SECMODDESC))
+CREATE VIEW USERCOURSEASSIGNMENTS WITH SCHEMABINDING AS SELECT DISTINCT T2.COMPANYID, T2.USERPRID, COALESCE (T9.COURSID, T1.COURSID) AS COURSID FROM   dbo.USERGROUP AS T2 INNER JOIN dbo.COURSEGROUP AS T3 ON T3.COMPANYID = T2.COMPANYID AND T3.ILSGROUPID = T2.ILSGROUPID INNER JOIN dbo.COURSE AS T1 ON T1.COMPANYID = T3.COMPANYID AND T1.COURSID = T3.COURSID LEFT OUTER JOIN dbo.CURRICULUMCOURSE AS T5 ON T5.COMPANYID = T1.COMPANYID AND T5.CURRICULUMID = T1.COURSID AND T1.COURSISCURRICULUM = 'T' LEFT OUTER JOIN dbo.COURSE AS T9 ON T5.COMPANYID IS NOT NULL AND T9.COMPANYID = T5.COMPANYID AND T9.COURSID = T5.COURSID WHERE (T9.COURSID IS NULL) AND (T1.COURSISCURRICULUM IS NULL) AND (T9.COURSID IS NULL) AND (T1.COURSISQUICKVIEW IS NULL OR T1.COURSISQUICKVIEW <> 'T') OR (T9.COURSID IS NULL) AND (T1.COURSISCURRICULUM IS NULL) AND (T9.COURSID IS NOT NULL) AND (T9.COURSISQUICKVIEW IS NULL OR T9.COURSISQUICKVIEW <> 'T') OR (T9.COURSID IS NULL) AND (T1.COURSISCURRICULUM <> 'T') AND (T1.COURSISQUICKVIEW IS NULL OR T1.COURSISQUICKVIEW <> 'T') OR (T9.COURSID IS NOT NULL) AND (T1.COURSISCURRICULUM <> 'T') AND (T9.COURSISQUICKVIEW IS NULL OR T9.COURSISQUICKVIEW <> 'T') OR (T9.COURSID IS NULL) AND (T1.COURSISQUICKVIEW IS NULL OR T1.COURSISQUICKVIEW <> 'T') AND (T1.COURSID <> T9.COURSID) OR (T9.COURSID IS NOT NULL) AND (T9.COURSISQUICKVIEW IS NULL OR T9.COURSISQUICKVIEW <> 'T') AND (T1.COURSID <> T9.COURSID);
+CREATE VIEW COURSEATTEMPTSTATUS WITH SCHEMABINDING AS SELECT CA.COMPANYID, CA.USERPRID, CA.COURSID, CA.COURSATTID, CA.CACOMPLETEDATE, CA.CAEXPIREDON,  COALESCE(CA.CASTATUSID, 0) AS CASTATUSID, CASE COALESCE(CA.CASTATUSID, 0) WHEN 3 THEN 1 WHEN 0 THEN 1 ELSE 0 END AS CRS_OPEN, CASE COALESCE(CA.CASTATUSID, 0) WHEN 1 THEN 1 ELSE 0 END               AS CRS_COMPLETED, CASE COALESCE(CA.CASTATUSID, 0) WHEN 2 THEN 1 ELSE 0 END               AS CRS_FAILED FROM DBO.COURSEATTEMPT CA;
+CREATE NONCLUSTERED INDEX CAEXPIREDONINDEX ON COURSEATTEMPT (COMPANYID,CAEXPIREDON) INCLUDE (USERPRID,COURSID,CACOMPLETEDATE,CASTATUSID)
 INSERT INTO COMPANY (CONAME, COFUNDSAVAIL, COPERSEATCOST, COLOGOURL, COCOPYRIGHT) VALUES ('ILS', 0.00, 0.00, 'images/logo.gif', 'Copyright (C) 2006 ILS')
 INSERT INTO SYSCONF (COMPANYID, SYSCFCOLLABURL, SYSCFEMAILSRV) VALUES (1, 'http://crosswire.org/forums', 'mail.crosswire.org')
 INSERT INTO COURSEATTSTATUS (COMPANYID, CASTATUSID, CASTATUSDESC) VALUES (1, 0, 'NEW')



From scribe at crosswire.org  Tue Oct 20 19:47:50 2015
From: scribe at crosswire.org (scribe at crosswire.org)
Date: Tue, 20 Oct 2015 19:47:50 -0700
Subject: [Ils-source] r1351 - trunk/webapp/api/user/put
Message-ID: <E1ZojRO-0005HS-M3@crosswire.org>

Author: scribe
Date: 2015-10-20 19:47:50 -0700 (Tue, 20 Oct 2015)
New Revision: 1351

Modified:
   trunk/webapp/api/user/put/index.jsp
Log:
Applied patch from Adam to fix Middle Name and add Name Suffix


Modified: trunk/webapp/api/user/put/index.jsp
===================================================================
--- trunk/webapp/api/user/put/index.jsp	2015-10-03 20:03:27 UTC (rev 1350)
+++ trunk/webapp/api/user/put/index.jsp	2015-10-21 02:47:50 UTC (rev 1351)
@@ -206,6 +206,10 @@
 
 	val = request.getParameter("firstName");
 	if (val != null && val.trim().length() > 0) current.setUserProfileFirstName(val);
+	val = request.getParameter("middleName");
+	if (val != null && val.trim().length() > 0) current.setUserProfileMiddleName(val);
+	val = request.getParameter("suffixName");
+	if (val != null && val.trim().length() > 0) current.setUserProfileSuffixName(val);
 	val = request.getParameter("lastName");
 	if (val != null && val.trim().length() > 0) current.setUserProfileLastName(val);
 	val = request.getParameter("employeeTitle");
@@ -349,6 +353,7 @@
 <tr><th>firstName</th><td>First Name</td></tr>
 <tr><th>middleName</th><td>Middle Name</td></tr>
 <tr><th>lastName</th><td>Last Name</td></tr>
+<tr><th>suffixName</th><td>Name Suffix (e.g., Jr.)</td></tr>
 <tr><th>employeeTitle</th><td>Employee Title ID {unfinished, will lookup by title string in the future}</td></tr>
 <tr><th>addr1</th><td>Address, Line 1</td></tr>
 <tr><th>addr2</th><td>Address, Line 2</td></tr>



From scribe at crosswire.org  Wed Oct 21 16:27:00 2015
From: scribe at crosswire.org (scribe at crosswire.org)
Date: Wed, 21 Oct 2015 16:27:00 -0700
Subject: [Ils-source] r1352 - trunk/webapp/api/user/put
Message-ID: <E1Zp2ma-0008Fc-0n@crosswire.org>

Author: scribe
Date: 2015-10-21 16:26:59 -0700 (Wed, 21 Oct 2015)
New Revision: 1352

Modified:
   trunk/webapp/api/user/put/index.jsp
Log:
Added return of location id or role id if set


Modified: trunk/webapp/api/user/put/index.jsp
===================================================================
--- trunk/webapp/api/user/put/index.jsp	2015-10-21 02:47:50 UTC (rev 1351)
+++ trunk/webapp/api/user/put/index.jsp	2015-10-21 23:26:59 UTC (rev 1352)
@@ -330,7 +330,7 @@
 		}
 	}
 %>
-<success userProfileID="<%=current.getUserProfileID()%>"/>
+<success userProfileID="<%=current.getUserProfileID()%>"<%=requestedRole > -1 ? " updatedRoleID=\"" + requestedRole + "\"" : ""%><%=requestedLocation > -1 ? " updatedLocationID=\"" + requestedLocation + "\"" : ""%>/>
 <%
 	return;
 



From scribe at crosswire.org  Thu Oct 22 12:06:46 2015
From: scribe at crosswire.org (scribe at crosswire.org)
Date: Thu, 22 Oct 2015 12:06:46 -0700
Subject: [Ils-source] r1353 - in trunk/webapp/api/group: . addmanager
	removemanager
Message-ID: <E1ZpLCI-0007te-6c@crosswire.org>

Author: scribe
Date: 2015-10-22 12:06:45 -0700 (Thu, 22 Oct 2015)
New Revision: 1353

Added:
   trunk/webapp/api/group/addmanager/
   trunk/webapp/api/group/addmanager/index.jsp
   trunk/webapp/api/group/removemanager/
   trunk/webapp/api/group/removemanager/index.jsp
Log:
added group/addmanager and group/removemanager api calls


Added: trunk/webapp/api/group/addmanager/index.jsp
===================================================================
--- trunk/webapp/api/group/addmanager/index.jsp	                        (rev 0)
+++ trunk/webapp/api/group/addmanager/index.jsp	2015-10-22 19:06:45 UTC (rev 1353)
@@ -0,0 +1,126 @@
+<%@ page language="java" contentType="text/xml;charset=utf-8" %>
+<%@ page trimDirectiveWhitespaces="true" %>
+<%@ page import="com.resolutions.ils.Utils" %>
+<%@ page import="com.resolutions.ils.ILSSession" %>
+<%@ page import="com.resolutions.ils.data.Company" %>
+<%@ page import="com.resolutions.ils.data.Group" %>
+<%@ page import="com.resolutions.ils.data.UserProfile" %>
+<%@ page import="org.apache.log4j.Logger" %>
+
+<%
+	// standard service header ---------------------------------------
+	response.setContentType("text/xml");
+	int errCode = 0;
+	Company company = Company.getCompany(request);
+    
+	boolean apiEnabled = "on".equals(Utils.getSysConfig(session.getServletContext(), company.getCompanyID()).getProperty("APIEnable", "off"));
+	++errCode;
+	if (!apiEnabled) {
+		out.print("<error code=\""+errCode+"\" message=\"API not enabled in system management settings.\"/>");
+		return;
+	}
+
+	String userID = request.getParameter("ILSUSER");
+	String userPw = request.getParameter("ILSPASSWD");
+	ILSSession ilsSession = (userID != null && userPw != null)
+			? ILSSession.login(company.getCompanyName(), userID, userPw)
+			: (ILSSession)session.getAttribute("ilsSession");
+	++errCode;
+	if (ilsSession == null) {
+		out.print("<error code=\""+errCode+"\" message=\"Your iLS sign in information is not valid.\"/>");
+		return;
+	}
+	// end standard service header -----------------------------------
+
+
+	int groupID  = -1; try { groupID = Integer.parseInt(request.getParameter("groupID")); } catch(Exception e) {}
+	int groupTypeID  = -1; try { groupTypeID = Integer.parseInt(request.getParameter("groupTypeID")); } catch(Exception e) {}
+	int userProfileID  = -1; try { userProfileID = Integer.parseInt(request.getParameter("userProfileID")); } catch(Exception e) {}
+	String loginID     = request.getParameter("loginID");
+	String userProfileUserData    = request.getParameter("userProfileUserData");
+	String userData   = request.getParameter("userData");
+	String groupName  = request.getParameter("groupName");
+
+// one of these must be supplied; otherwise, show usage info
+if (groupTypeID != -1 && (groupID != -1 || groupName != null || userData != null) 
+	&& (userProfileID != -1 || loginID != null || userProfileUserData != null)) {
+	String errMsg = "";
+
+	UserProfile adminUser = ilsSession.getCurrentUserProfile();
+
+	Logger logger         = Logger.getLogger(this.getClass());
+	Logger eventsLogger   = Logger.getLogger("EVENTS");
+
+	Group current = null;
+	++errCode;
+	if ((adminUser.getUserProfileAccessLevel() > UserProfile.ACCESS_MANAGER) || (adminUser.hasAccess(UserProfile.ACCESS_MODE_USERPR_ADD_USER)) || (adminUser.hasAccess(UserProfile.ACCESS_MODE_USERPR_MODIFY_USER))) {
+		if (groupID != -1) {
+			current = Group.getGroup(ilsSession, groupID);
+		}
+		else if (userData != null) {
+			current = Group.getGroupByUserData(ilsSession, groupTypeID, userData);
+		}
+		if (current == null) {
+			out.print("<error code=\""+errCode+"\" message=\"Group not found.\"/>");
+			return;
+		}
+	}
+	else {
+		++errCode;
+		out.print("<error code=\""+errCode+"\" message=\"Permission denied.\"/>");
+		return;
+	}
+
+	errCode += 2;
+	if (current.getGroupID() > 0 && adminUser.getUserProfileAccessLevel() <= UserProfile.ACCESS_MANAGER && !adminUser.hasAccess(UserProfile.ACCESS_MODE_USERPR_MODIFY_USER)) {
+		out.print("<error code=\""+errCode+"\" message=\"Permission denied to edit group.\"/>");
+		return;
+	}
+
+	++errCode;
+	UserProfile manager = null;
+		if (userProfileID != -1) {
+			manager = UserProfile.getUserProfile(ilsSession, userProfileID);
+		}
+		else if (userData != null) {
+			manager = UserProfile.getUserProfileByUserData(ilsSession, userProfileUserData);
+		}
+		if (manager == null) {
+			out.print("<error code=\""+errCode+"\" message=\"UserProfile not found.\"/>");
+			return;
+		}
+
+	++errCode;
+
+	int updateCount = current.addManagerGroup(ilsSession, current.getGroupID(), manager.getUserProfileID());
+	if (updateCount < 0) updateCount = 0;
+
+%>
+<success groupID="<%=current.getGroupID()%>"<%= updateCount > -1 ? (" membersUpdated=\""+updateCount+"\"") : ""%>/>
+<%
+	return;
+
+}
+response.setContentType("text/html");
+%>
+<html>
+<style>th { text-align:left; }</style>
+<body>
+<h1>group/addmanger</h1>
+<p>Add user profile to manager list for a group</p>
+<h3>Parameters</h3>
+<table border="1">
+<tbody>
+<tr><th>groupID</th><td>The record to modify.  Either this parameter, or userData can be supplied to update an existing record. This order of precedence is used. If more than one of these is supplied, the subsequent parameter is used as an update field for the record.</td></tr>
+<tr><th>userData</th><td>3rd-party supplied record identifier for group</td></tr>
+<tr><th>groupTypeID</th><td>Group Type ID. default groups {1 - ROLE; 2 - WORKGROUP}</td></tr>
+<tr><th>userProfileID</th><td>adds this user to the manager list for this group</td></tr>
+<tr><th>loginID</th><td>adds this user to the manager list for this group, specified by User Login ID</td></tr>
+<tr><th>userProfileUserData</th><td>adds this user to the manager list for this group, specified by 3rd-party supplied record identifier for this user</td></tr>
+<tr><th>ILSUSER</th><td>ILS Login Credentials. Used to validate this API request.</td></tr>
+<tr><th>ILSPASSWD</th><td>ILS Login Credentials. Used to validate this API request.</td></tr>
+</tbody>
+</table>
+</body>
+</html>
+

Added: trunk/webapp/api/group/removemanager/index.jsp
===================================================================
--- trunk/webapp/api/group/removemanager/index.jsp	                        (rev 0)
+++ trunk/webapp/api/group/removemanager/index.jsp	2015-10-22 19:06:45 UTC (rev 1353)
@@ -0,0 +1,125 @@
+<%@ page language="java" contentType="text/xml;charset=utf-8" %>
+<%@ page trimDirectiveWhitespaces="true" %>
+<%@ page import="com.resolutions.ils.Utils" %>
+<%@ page import="com.resolutions.ils.ILSSession" %>
+<%@ page import="com.resolutions.ils.data.Company" %>
+<%@ page import="com.resolutions.ils.data.Group" %>
+<%@ page import="com.resolutions.ils.data.UserProfile" %>
+<%@ page import="org.apache.log4j.Logger" %>
+
+<%
+	// standard service header ---------------------------------------
+	response.setContentType("text/xml");
+	int errCode = 0;
+	Company company = Company.getCompany(request);
+    
+	boolean apiEnabled = "on".equals(Utils.getSysConfig(session.getServletContext(), company.getCompanyID()).getProperty("APIEnable", "off"));
+	++errCode;
+	if (!apiEnabled) {
+		out.print("<error code=\""+errCode+"\" message=\"API not enabled in system management settings.\"/>");
+		return;
+	}
+
+	String userID = request.getParameter("ILSUSER");
+	String userPw = request.getParameter("ILSPASSWD");
+	ILSSession ilsSession = (userID != null && userPw != null)
+			? ILSSession.login(company.getCompanyName(), userID, userPw)
+			: (ILSSession)session.getAttribute("ilsSession");
+	++errCode;
+	if (ilsSession == null) {
+		out.print("<error code=\""+errCode+"\" message=\"Your iLS sign in information is not valid.\"/>");
+		return;
+	}
+	// end standard service header -----------------------------------
+
+
+	int groupID  = -1; try { groupID = Integer.parseInt(request.getParameter("groupID")); } catch(Exception e) {}
+	int groupTypeID  = -1; try { groupTypeID = Integer.parseInt(request.getParameter("groupTypeID")); } catch(Exception e) {}
+	int userProfileID  = -1; try { userProfileID = Integer.parseInt(request.getParameter("userProfileID")); } catch(Exception e) {}
+	String loginID     = request.getParameter("loginID");
+	String userProfileUserData    = request.getParameter("userProfileUserData");
+	String userData   = request.getParameter("userData");
+	String groupName  = request.getParameter("groupName");
+
+// one of these must be supplied; otherwise, show usage info
+if (groupTypeID != -1 && (groupID != -1 || groupName != null || userData != null) 
+	&& (userProfileID != -1 || loginID != null || userProfileUserData != null)) {
+	String errMsg = "";
+
+	UserProfile adminUser = ilsSession.getCurrentUserProfile();
+
+	Logger logger         = Logger.getLogger(this.getClass());
+	Logger eventsLogger   = Logger.getLogger("EVENTS");
+
+	Group current = null;
+	++errCode;
+	if ((adminUser.getUserProfileAccessLevel() > UserProfile.ACCESS_MANAGER) || (adminUser.hasAccess(UserProfile.ACCESS_MODE_USERPR_ADD_USER)) || (adminUser.hasAccess(UserProfile.ACCESS_MODE_USERPR_MODIFY_USER))) {
+		if (groupID != -1) {
+			current = Group.getGroup(ilsSession, groupID);
+		}
+		else if (userData != null) {
+			current = Group.getGroupByUserData(ilsSession, groupTypeID, userData);
+		}
+		if (current == null) {
+			out.print("<error code=\""+errCode+"\" message=\"Group not found.\"/>");
+			return;
+		}
+	}
+	else {
+		++errCode;
+		out.print("<error code=\""+errCode+"\" message=\"Permission denied.\"/>");
+		return;
+	}
+
+	errCode += 2;
+	if (current.getGroupID() > 0 && adminUser.getUserProfileAccessLevel() <= UserProfile.ACCESS_MANAGER && !adminUser.hasAccess(UserProfile.ACCESS_MODE_USERPR_MODIFY_USER)) {
+		out.print("<error code=\""+errCode+"\" message=\"Permission denied to edit group.\"/>");
+		return;
+	}
+
+	++errCode;
+	UserProfile manager = null;
+		if (userProfileID != -1) {
+			manager = UserProfile.getUserProfile(ilsSession, userProfileID);
+		}
+		else if (userData != null) {
+			manager = UserProfile.getUserProfileByUserData(ilsSession, userProfileUserData);
+		}
+		if (manager == null) {
+			out.print("<error code=\""+errCode+"\" message=\"UserProfile not found.\"/>");
+			return;
+		}
+
+	++errCode;
+
+	int updateCount = current.deleteManagerGroup(ilsSession, current.getGroupID(), manager.getUserProfileID());
+
+%>
+<success groupID="<%=current.getGroupID()%>"<%= updateCount > -1 ? (" membersUpdated=\""+updateCount+"\"") : ""%>/>
+<%
+	return;
+
+}
+response.setContentType("text/html");
+%>
+<html>
+<style>th { text-align:left; }</style>
+<body>
+<h1>group/removemanger</h1>
+<p>Remove user profile to manager list for a group</p>
+<h3>Parameters</h3>
+<table border="1">
+<tbody>
+<tr><th>groupID</th><td>The record to modify.  Either this parameter, or userData can be supplied to update an existing record. This order of precedence is used. If more than one of these is supplied, the subsequent parameter is used as an update field for the record.</td></tr>
+<tr><th>userData</th><td>3rd-party supplied record identifier for group</td></tr>
+<tr><th>groupTypeID</th><td>Group Type ID. default groups {1 - ROLE; 2 - WORKGROUP}</td></tr>
+<tr><th>userProfileID</th><td>adds this user to the manager list for this group</td></tr>
+<tr><th>loginID</th><td>adds this user to the manager list for this group, specified by User Login ID</td></tr>
+<tr><th>userProfileUserData</th><td>adds this user to the manager list for this group, specified by 3rd-party supplied record identifier for this user</td></tr>
+<tr><th>ILSUSER</th><td>ILS Login Credentials. Used to validate this API request.</td></tr>
+<tr><th>ILSPASSWD</th><td>ILS Login Credentials. Used to validate this API request.</td></tr>
+</tbody>
+</table>
+</body>
+</html>
+



