瀏覽代碼

Merge pull request #1825 from stuartort/CE-ldap

LDAP / esp addition in community OSS code

Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 13 年之前
父節點
當前提交
b0e5374378
共有 46 個文件被更改,包括 9657 次插入77 次删除
  1. 35 0
      esp/eclwatch/ws_XSLT/CMakeLists.txt
  2. 436 0
      esp/eclwatch/ws_XSLT/access_accountpermissions.xslt
  3. 68 0
      esp/eclwatch/ws_XSLT/access_adduser.xslt
  4. 133 0
      esp/eclwatch/ws_XSLT/access_basedns.xslt
  5. 307 0
      esp/eclwatch/ws_XSLT/access_filepermission.xslt
  6. 68 0
      esp/eclwatch/ws_XSLT/access_groupadd.xslt
  7. 133 0
      esp/eclwatch/ws_XSLT/access_groupdelete.xslt
  8. 168 0
      esp/eclwatch/ws_XSLT/access_groupedit.xslt
  9. 67 0
      esp/eclwatch/ws_XSLT/access_groupmemberedit.xslt
  10. 169 0
      esp/eclwatch/ws_XSLT/access_groupmembereditinput.xslt
  11. 213 0
      esp/eclwatch/ws_XSLT/access_groups.xslt
  12. 319 0
      esp/eclwatch/ws_XSLT/access_permissionaddinput.xslt
  13. 77 0
      esp/eclwatch/ws_XSLT/access_permissionchange.xslt
  14. 504 0
      esp/eclwatch/ws_XSLT/access_permissionresetinput.xslt
  15. 343 0
      esp/eclwatch/ws_XSLT/access_permissions.xslt
  16. 65 0
      esp/eclwatch/ws_XSLT/access_permissionsreset.xslt
  17. 56 0
      esp/eclwatch/ws_XSLT/access_posix.xslt
  18. 146 0
      esp/eclwatch/ws_XSLT/access_posixinput.xslt
  19. 66 0
      esp/eclwatch/ws_XSLT/access_resetpass.xslt
  20. 56 0
      esp/eclwatch/ws_XSLT/access_resetpassinput.xslt
  21. 84 0
      esp/eclwatch/ws_XSLT/access_resourceadd.xslt
  22. 72 0
      esp/eclwatch/ws_XSLT/access_resourceaddinput.xslt
  23. 68 0
      esp/eclwatch/ws_XSLT/access_resourcedelete.xslt
  24. 281 0
      esp/eclwatch/ws_XSLT/access_resources.xslt
  25. 60 0
      esp/eclwatch/ws_XSLT/access_sudoers.xslt
  26. 87 0
      esp/eclwatch/ws_XSLT/access_sudoersinput.xslt
  27. 66 0
      esp/eclwatch/ws_XSLT/access_useraction.xslt
  28. 167 0
      esp/eclwatch/ws_XSLT/access_useredit.xslt
  29. 72 0
      esp/eclwatch/ws_XSLT/access_usergroupedit.xslt
  30. 156 0
      esp/eclwatch/ws_XSLT/access_usergroupeditinput.xslt
  31. 66 0
      esp/eclwatch/ws_XSLT/access_userinfoedit.xslt
  32. 72 0
      esp/eclwatch/ws_XSLT/access_userinfoeditinput.xslt
  33. 235 0
      esp/eclwatch/ws_XSLT/access_users.xslt
  34. 72 0
      esp/eclwatch/ws_XSLT/account.xslt
  35. 58 0
      esp/eclwatch/ws_XSLT/account_input.xslt
  36. 42 0
      esp/eclwatch/ws_XSLT/account_whoami.xslt
  37. 1 0
      esp/scm/espscm.cmake
  38. 690 0
      esp/scm/ws_access.ecm
  39. 37 1
      esp/scm/ws_account.ecm
  40. 14 13
      esp/services/ws_access/CMakeLists.txt
  41. 5 3
      esp/services/ws_access/ws_accessPlugin.cpp
  42. 3508 0
      esp/services/ws_access/ws_accessService.cpp
  43. 71 47
      esp/services/ws_access/ws_accessService.hpp
  44. 2 0
      esp/services/ws_account/ws_accountPlugin.cpp
  45. 139 0
      esp/services/ws_account/ws_accountService.cpp
  46. 103 13
      esp/services/ws_account/ws_accountService.hpp

+ 35 - 0
esp/eclwatch/ws_XSLT/CMakeLists.txt

@@ -135,6 +135,41 @@ FOREACH ( iFILES
     ${CMAKE_CURRENT_SOURCE_DIR}/dropzonefilelist.xslt
     ${CMAKE_CURRENT_SOURCE_DIR}/WUCopyLogicalFiles.xslt
     ${CMAKE_CURRENT_SOURCE_DIR}/WUDeployWorkunit.xslt
+    ${CMAKE_CURRENT_SOURCE_DIR}/access_accountpermissions.xslt
+    ${CMAKE_CURRENT_SOURCE_DIR}/access_adduser.xslt
+    ${CMAKE_CURRENT_SOURCE_DIR}/access_basedns.xslt
+    ${CMAKE_CURRENT_SOURCE_DIR}/access_filepermission.xslt
+    ${CMAKE_CURRENT_SOURCE_DIR}/access_groupadd.xslt
+    ${CMAKE_CURRENT_SOURCE_DIR}/access_groupdelete.xslt
+    ${CMAKE_CURRENT_SOURCE_DIR}/access_groupedit.xslt
+    ${CMAKE_CURRENT_SOURCE_DIR}/access_groupmemberedit.xslt
+    ${CMAKE_CURRENT_SOURCE_DIR}/access_groupmembereditinput.xslt
+    ${CMAKE_CURRENT_SOURCE_DIR}/access_groups.xslt
+    ${CMAKE_CURRENT_SOURCE_DIR}/access_permissionaddinput.xslt
+    ${CMAKE_CURRENT_SOURCE_DIR}/access_permissionchange.xslt
+    ${CMAKE_CURRENT_SOURCE_DIR}/access_permissionresetinput.xslt
+    ${CMAKE_CURRENT_SOURCE_DIR}/access_permissions.xslt
+    ${CMAKE_CURRENT_SOURCE_DIR}/access_permissionsreset.xslt
+    ${CMAKE_CURRENT_SOURCE_DIR}/access_posix.xslt
+    ${CMAKE_CURRENT_SOURCE_DIR}/access_posixinput.xslt
+    ${CMAKE_CURRENT_SOURCE_DIR}/access_resetpass.xslt
+    ${CMAKE_CURRENT_SOURCE_DIR}/access_resetpassinput.xslt
+    ${CMAKE_CURRENT_SOURCE_DIR}/access_resourceadd.xslt
+    ${CMAKE_CURRENT_SOURCE_DIR}/access_resourceaddinput.xslt
+    ${CMAKE_CURRENT_SOURCE_DIR}/access_resourcedelete.xslt
+    ${CMAKE_CURRENT_SOURCE_DIR}/access_resources.xslt
+    ${CMAKE_CURRENT_SOURCE_DIR}/access_sudoers.xslt
+    ${CMAKE_CURRENT_SOURCE_DIR}/access_sudoersinput.xslt
+    ${CMAKE_CURRENT_SOURCE_DIR}/access_useraction.xslt
+    ${CMAKE_CURRENT_SOURCE_DIR}/access_useredit.xslt
+    ${CMAKE_CURRENT_SOURCE_DIR}/access_usergroupedit.xslt
+    ${CMAKE_CURRENT_SOURCE_DIR}/access_usergroupeditinput.xslt
+    ${CMAKE_CURRENT_SOURCE_DIR}/access_userinfoedit.xslt
+    ${CMAKE_CURRENT_SOURCE_DIR}/access_userinfoeditinput.xslt
+    ${CMAKE_CURRENT_SOURCE_DIR}/access_users.xslt
+    ${CMAKE_CURRENT_SOURCE_DIR}/account.xslt
+    ${CMAKE_CURRENT_SOURCE_DIR}/account_input.xslt
+    ${CMAKE_CURRENT_SOURCE_DIR}/account_whoami.xslt
 )
     Install ( FILES ${iFILES} DESTINATION ${OSSDIR}/componentfiles/smc_xslt COMPONENT Runtime )
 ENDFOREACH ( iFILES )

+ 436 - 0
esp/eclwatch/ws_XSLT/access_accountpermissions.xslt

@@ -0,0 +1,436 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Copyright (C) <2010>  <LexisNexis Risk Data Management Inc.>
+
+    All rights reserved. This program is NOT PRESENTLY free software: you can NOT redistribute it and/or modify
+    it under the terms of the GNU Affero General Public License as
+    published by the Free Software Foundation, either version 3 of the
+    License, or (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU Affero General Public License for more details.
+
+    You should have received a copy of the GNU Affero General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+-->
+
+    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+    <xsl:output method="html"/>
+    <xsl:template match="/AccountPermissionsResponse">
+        <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+        <head>
+            <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+            <title>Permissions</title>
+      <link rel="stylesheet" type="text/css" href="/esp/files/yui/build/fonts/fonts-min.css" />
+      <link rel="stylesheet" type="text/css" href="/esp/files/css/espdefault.css" />
+      <link rel="stylesheet" type="text/css" href="/esp/files/css/eclwatch.css" />
+      <link type="text/css" rel="StyleSheet" href="files_/css/sortabletable.css"/>
+      <script type="text/javascript" src="/esp/files/scripts/espdefault.js">&#160;</script>
+      <script type="text/javascript" src="files_/scripts/sortabletable.js">
+                <xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
+            </script>
+            <script language="JavaScript1.2" src="files_/scripts/multiselect.js">
+                <xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
+            </script>
+            <script language="JavaScript1.2">
+            <xsl:text disable-output-escaping="yes"><![CDATA[
+                function getSelected(o)
+                {
+                    if (o.tagName=='INPUT' && o.type == 'checkbox' && o.value != 'on')
+                        return o.checked ? '\n'+o.value : '';
+
+                    var s='';
+                    var ch=o.children;
+                    if (ch)
+                        for (var i in ch)
+                            s=s+getSelected(ch[i]);
+                    return s;
+                }
+
+                function onLoad()
+                {
+                    initSelection('resultsTable');
+                    var table = document.getElementById('resultsTable');
+                    if (table)
+                        sortableTable = new SortableTable(table, table, ["String", "None", "None", "None"]);
+                }
+
+                function onSubmit(o, theaction)
+                {
+                    document.forms[0].action = ""+theaction;
+                    return true;
+                }
+
+                function translate(boolval)
+                {
+                    if(boolval == 1)
+                    {
+                        return "checked";
+                    }
+                    else
+                    {
+                        return "";
+                    }
+                }
+                function permChange(i)
+                {
+          iname = i.id.substr(0, 12);
+          iposition = i.id.substr(12);
+                    if(iname == "allow_access")
+                    {
+                        if(i.checked)
+                        {
+              document.getElementById('deny__access' + iposition).checked=false;
+              document.getElementById('deny__full__' + iposition).checked=false;
+                        }
+                        else
+              document.getElementById('allow_full__' + iposition).checked=false;
+                    }
+                    else if(iname == "allow_read__")
+                    {
+                        if(i.checked)
+                        {
+                            document.getElementById('deny__read__' + iposition).checked=false;
+                            document.getElementById('deny__full__' + iposition).checked=false;
+                        }
+                        else
+                            document.getElementById('allow_full__' + iposition).checked = false;
+                    }
+                    else if(iname == "allow_write_")
+                    {
+                        if(i.checked)
+                        {
+                            document.getElementById('deny__write_' + iposition).checked=false;
+                            document.getElementById('deny__full__' + iposition).checked=false;
+                        }
+                        else
+                            document.getElementById('allow_full__' + iposition).checked = false;
+                    }
+                    else if(iname == "allow_full__")
+                    {
+                        if(i.checked)
+                        {
+                            document.getElementById('deny__access' + iposition).checked=false;
+                            document.getElementById('deny__read__' + iposition).checked=false;
+                            document.getElementById('deny__write_' + iposition).checked=false;
+                            document.getElementById('deny__full__' + iposition).checked=false;
+                            document.getElementById('allow_access' + iposition).checked = true;
+                            document.getElementById('allow_read__' + iposition).checked = true;
+                            document.getElementById('allow_write_' + iposition).checked = true;
+                        }
+                    }
+                    else if(iname == "deny__access")
+                    {
+                        if(i.checked)
+                        {
+                            document.getElementById('allow_access' + iposition).checked=false;
+                            document.getElementById('allow_full__' + iposition).checked=false;
+                        }
+                        else
+                            document.getElementById('deny__full__' + iposition).checked = false;
+                    }
+                    else if(iname == "deny__read__")
+                    {
+                        if(i.checked)
+                        {
+                            document.getElementById('allow_read__' + iposition).checked=false;
+                            document.getElementById('allow_full__' + iposition).checked=false;
+                        }
+                        else
+                            document.getElementById('deny__full__' + iposition).checked = false;
+                    }
+                    else if(iname == "deny__write_")
+                    {
+                        if(i.checked)
+                        {
+                            document.getElementById('allow_write_' + iposition).checked=false;
+                            document.getElementById('allow_full__' + iposition).checked=false;
+                        }
+                        else
+                            document.getElementById('deny__full__' + iposition).checked = false;
+                    }
+                    else if(iname == "deny__full__")
+                    {
+                        if(i.checked)
+                        {
+                            document.getElementById('allow_access' + iposition).checked=false;
+                            document.getElementById('allow_read__' + iposition).checked=false;
+                            document.getElementById('allow_write_' + iposition).checked=false;
+                            document.getElementById('allow_full__' + iposition).checked=false;
+                            document.getElementById('deny__access' + iposition).checked = true;
+                            document.getElementById('deny__read__' + iposition).checked = true;
+                            document.getElementById('deny__write_' + iposition).checked = true;
+                        }
+                    }
+                }
+        function onUpdate(f, position, message)
+                {
+          ret = confirm(message);
+          if (ret)
+          {
+            f.allow_access.value = (document.getElementById('allow_access_' + position).checked ? 1: 0);
+            f.allow_read.value   = (document.getElementById('allow_read___' + position).checked ? 1: 0);
+            f.allow_write.value  = (document.getElementById('allow_write__' + position).checked ? 1: 0);
+            f.allow_full.value   = (document.getElementById('allow_full___' + position).checked ? 1: 0);
+            f.deny_access.value  = (document.getElementById('deny__access_' + position).checked ? 1: 0);
+            f.deny_read.value    = (document.getElementById('deny__read___' + position).checked ? 1: 0);
+            f.deny_write.value   = (document.getElementById('deny__write__' + position).checked ? 1: 0);
+            f.deny_full.value    = (document.getElementById('deny__full___' + position).checked ? 1: 0);
+          }
+
+          return ret;
+                }
+
+                var sortableTable = null;
+            ]]></xsl:text>
+            </script>
+        </head>
+    <body class="yui-skin-sam" onload="nof5();onLoad()">
+            <h3>Permissions of <xsl:value-of select="AccountName"/></h3>
+            <p/>
+            <xsl:choose>
+                <xsl:when test="not(Permissions/Permission[1])">
+                </xsl:when>
+                <xsl:otherwise>
+                    <!--xsl:apply-templates select="Permissions"/-->
+                    <xsl:apply-templates select="Permissions">
+                        <xsl:with-param name="AccountN" select="AccountName"/>
+                        <xsl:with-param name="AccountT" select="IsGroup"/>
+                    </xsl:apply-templates>
+                </xsl:otherwise>
+            </xsl:choose>
+            <form method="POST" action="/ws_access/PermissionAddInput">
+                <input type="hidden" name="AccountName" value="{AccountName}"/>
+                <input type="hidden" name="AccountType" value="{IsGroup}"/>
+                <input type="hidden" name="prefix" value="{prefix}"/>
+                <select size="1" name="BasednName">
+                    <xsl:apply-templates select="BasednNames"/>
+                </select>
+                <input type="submit" class="sbutton" name="action" value="  Add  "/>
+            </form>
+            <p/>
+            <xsl:choose>
+                <xsl:when test="not(GroupPermissions/GroupPermission[1])">
+                </xsl:when>
+                <xsl:otherwise>
+                    <xsl:apply-templates select="GroupPermissions"/>
+                </xsl:otherwise>
+            </xsl:choose>
+        </body>
+        </html>
+    </xsl:template>
+
+    <xsl:template match="GroupPermissions">
+        <xsl:apply-templates select="GroupPermission"/>
+            <!--xsl:sort select="GroupName"/>
+        </xsl:apply-templates-->
+    </xsl:template>
+
+    <xsl:template match="GroupPermission">
+        <p/>
+        <h4>Inherited Permissions from Group: <xsl:value-of select="GroupName"/> (Changes inside this section will be applied to the whole group.)</h4>
+        <p/>
+        <xsl:choose>
+            <xsl:when test="not(Permissions/Permission[1])">
+            </xsl:when>
+            <xsl:otherwise>
+                <!--xsl:apply-templates/-->
+                <xsl:apply-templates select="Permissions">
+                    <xsl:with-param name="AccountN" select="GroupName"/>
+                    <xsl:with-param name="AccountT" select="1"/>
+                </xsl:apply-templates>
+            </xsl:otherwise>
+        </xsl:choose>
+        <form method="POST" action="/ws_access/PermissionAddInput">
+            <input type="hidden" name="AccountName" value="{GroupName}"/>
+            <input type="hidden" name="AccountType" value="1"/>
+            <input type="hidden" name="prefix" value="{prefix}"/>
+            <select size="1" name="BasednName">
+                <xsl:apply-templates select="/AccountPermissionsResponse/BasednNames"/>
+            </select>
+            <input type="submit" class="sbutton" name="action" value="  Add  "/>
+        </form>
+    </xsl:template>
+
+    <xsl:template match="Permissions">
+        <xsl:param name="AccountN"/>
+        <xsl:param name="AccountT"/>
+        <table class="sort-table" id="resultsTable">
+        <colgroup>
+            <col width="150"/>
+            <col width="150"/>
+            <col width="150"/>
+            <col width="150"/>
+            <col width="150"/>
+        </colgroup>
+        <thead>
+        <tr class="grey">
+        <th align="left">Resource</th>
+        <th align="left">Permission</th>
+        <th><table><tr><th/><th>allow</th><th/></tr><tr><td width="50">access</td><td width="50">read</td><td width="50">write</td><td width="50">full</td></tr></table></th>
+        <th><table><tr><th/><th>deny</th><th/></tr><tr><td width="50">access</td><td width="50">read</td><td width="50">write</td><td width="50">full</td></tr></table></th>
+        <th>Operation</th>
+        </tr>
+        </thead>
+        <tbody>
+        <xsl:apply-templates select="Permission">
+            <xsl:with-param name="AccountN" select="$AccountN"/>
+            <xsl:with-param name="AccountT" select="$AccountT"/>
+            <xsl:sort select="ResourceName"/>
+        </xsl:apply-templates>
+        </tbody>
+        </table>
+    </xsl:template>
+
+    <xsl:template match="Permission">
+        <xsl:param name="AccountN"/>
+        <xsl:param name="AccountT"/>
+        <tr onmouseenter="this.bgColor = '#F0F0FF'">
+        <xsl:choose>
+            <xsl:when test="position() mod 2">
+                <xsl:attribute name="bgColor">#FFFFFF</xsl:attribute>
+                <xsl:attribute name="onmouseleave">this.bgColor = '#FFFFFF'</xsl:attribute>
+            </xsl:when>
+            <xsl:otherwise>
+                <xsl:attribute name="bgColor">#F0F0F0</xsl:attribute>
+                <xsl:attribute name="onmouseleave">this.bgColor = '#F0F0F0'</xsl:attribute>
+            </xsl:otherwise>
+        </xsl:choose>
+        <td align="left">
+        <xsl:value-of select="ResourceName"/>
+        </td>
+        <td align="left">
+        <xsl:value-of select="PermissionName"/>
+        </td>
+        <xsl:variable name="ar" select="checked"/>
+        <td>
+            <table>
+            <tr>
+                <td width="50">
+                    <xsl:choose>
+                        <xsl:when test="allow_access=1">
+                            <input type="checkbox" id="allow_access_{$AccountN}_{position()}" name="allow_access" value="1" checked="1" onClick="permChange(this)"/>
+                        </xsl:when>
+                        <xsl:otherwise>
+                            <input type="checkbox" id="allow_access_{$AccountN}_{position()}" name="allow_access" value="1"  onClick="permChange(this)"/>
+                        </xsl:otherwise>
+                    </xsl:choose>
+                </td>
+                <td width="50">
+                    <xsl:choose>
+                        <xsl:when test="allow_read=1">
+                            <input type="checkbox" id="allow_read___{$AccountN}_{position()}" name="allow_read" value="1" checked="1" onClick="permChange(this)"/>
+                        </xsl:when>
+                        <xsl:otherwise>
+                            <input type="checkbox" id="allow_read___{$AccountN}_{position()}" name="allow_read" value="1"  onClick="permChange(this)"/>
+                        </xsl:otherwise>
+                    </xsl:choose>
+                </td>
+                <td width="50">
+                    <xsl:choose>
+                        <xsl:when test="allow_write=1">
+                            <input type="checkbox" id="allow_write__{$AccountN}_{position()}" name="allow_write" value="1" checked="1" onClick="permChange(this)"/>
+                        </xsl:when>
+                        <xsl:otherwise>
+                            <input type="checkbox" id="allow_write__{$AccountN}_{position()}" name="allow_write" value="1" onClick="permChange(this)"/>
+                        </xsl:otherwise>
+                    </xsl:choose>
+                </td>
+                <td width="50">
+                    <xsl:choose>
+                        <xsl:when test="allow_full=1">
+                            <input type="checkbox" id="allow_full___{$AccountN}_{position()}" name="allow_full" value="1" checked="1" onClick="permChange(this)"/>
+                        </xsl:when>
+                        <xsl:otherwise>
+                            <input type="checkbox" id="allow_full___{$AccountN}_{position()}" name="allow_full" value="1" onClick="permChange(this)"/>
+                        </xsl:otherwise>
+                    </xsl:choose>
+                </td>
+            </tr>
+            </table>
+        </td>
+        <td>
+            <table>
+            <tr>
+                <td width="50">
+                    <xsl:choose>
+                        <xsl:when test="deny_access=1">
+                            <input type="checkbox" id="deny__access_{$AccountN}_{position()}" name="deny_access" value="1" checked="1" onClick="permChange(this)"/>
+                        </xsl:when>
+                        <xsl:otherwise>
+                            <input type="checkbox" id="deny__access_{$AccountN}_{position()}" name="deny_access" value="1" onClick="permChange(this)"/>
+                        </xsl:otherwise>
+                    </xsl:choose>
+                </td>
+                <td width="50">
+                    <xsl:choose>
+                        <xsl:when test="deny_read=1">
+                            <input type="checkbox" id="deny__read___{$AccountN}_{position()}" name="deny_read" value="1" checked="1" onClick="permChange(this)"/>
+                        </xsl:when>
+                        <xsl:otherwise>
+                            <input type="checkbox" id="deny__read___{$AccountN}_{position()}" name="deny_read" value="1" onClick="permChange(this)"/>
+                        </xsl:otherwise>
+                    </xsl:choose>
+                </td>
+                <td width="50">
+                    <xsl:choose>
+                        <xsl:when test="deny_write=1">
+                            <input type="checkbox" id="deny__write__{$AccountN}_{position()}" name="deny_write" value="1" checked="1" onClick="permChange(this)"/>
+                        </xsl:when>
+                        <xsl:otherwise>
+                            <input type="checkbox" id="deny__write__{$AccountN}_{position()}" name="deny_write" value="1" onClick="permChange(this)"/>
+                        </xsl:otherwise>
+                    </xsl:choose>
+                </td>
+                <td width="50">
+                    <xsl:choose>
+                        <xsl:when test="deny_full=1">
+                            <input type="checkbox" id="deny__full___{$AccountN}_{position()}" name="deny_full" value="1" checked="1" onClick="permChange(this)"/>
+                        </xsl:when>
+                        <xsl:otherwise>
+                            <input type="checkbox" id="deny__full___{$AccountN}_{position()}" name="deny_full" value="1" onClick="permChange(this)"/>
+                        </xsl:otherwise>
+                    </xsl:choose>
+                </td>
+            </tr>
+            </table>
+        </td>
+        <td>
+      <form  method="post" action="/ws_access/PermissionAction">
+        <input type="hidden" name="AccountPermission" value="1"/>
+        <input type="hidden" name="basedn" value="{basedn}"/>
+        <input type="hidden" name="rtype" value="{RType}"/>
+        <input type="hidden" name="rname" value="{PermissionName}"/>
+        <input type="hidden" name="rtitle" value="{ResourceName}"/>
+        <!--input type="hidden" name="prefix" value="{../../prefix}"/-->
+        <input type="hidden" name="account_name" value="{$AccountN}"/>
+        <input type="hidden" name="account_type" value="{$AccountT}"/>
+        <input type="hidden" name="allow_access" value=""/>
+        <input type="hidden" name="allow_read" value=""/>
+        <input type="hidden" name="allow_write" value=""/>
+        <input type="hidden" name="allow_full" value=""/>
+        <input type="hidden" name="deny_access" value=""/>
+        <input type="hidden" name="deny_read" value=""/>
+        <input type="hidden" name="deny_write" value=""/>
+        <input type="hidden" name="deny_full" value=""/>
+
+        <input type="submit" name="action" value="delete" onclick="return confirm('Are you sure you want to delete permissions for {$AccountN}?')"/><input type="submit" name="action" value="update" onclick="return onUpdate(this.form, '{$AccountN}_{position()}', 'Are you sure you want to update permissions for {$AccountN}?')"/>
+      </form>
+    </td>
+        <!--td><input type="submit" name="action" value="delete" onclick="return confirm('Are you sure?')"/><input type="submit" name="action" value="update" onclick="return confirm('Are you sure?')"/></td-->
+      </tr>
+  </xsl:template>
+
+    <xsl:template match="BasednNames">
+        <xsl:apply-templates select="Item" />
+    </xsl:template>
+
+    <xsl:template match="Item">
+        <option value="{.}"><xsl:value-of select="."/></option>
+    </xsl:template>
+    <xsl:template match="*|@*|text()"/>
+
+</xsl:stylesheet>

+ 68 - 0
esp/eclwatch/ws_XSLT/access_adduser.xslt

@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Copyright (C) <2010>  <LexisNexis Risk Data Management Inc.>
+
+    All rights reserved. This program is NOT PRESENTLY free software: you can NOT redistribute it and/or modify
+    it under the terms of the GNU Affero General Public License as
+    published by the Free Software Foundation, either version 3 of the
+    License, or (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU Affero General Public License for more details.
+
+    You should have received a copy of the GNU Affero General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+-->
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
+<xsl:output method="html"/>
+    <xsl:output method="html"/>
+    <xsl:template match="/">
+        <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+        <head>
+            <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+      <link rel="stylesheet" type="text/css" href="/esp/files/yui/build/fonts/fonts-min.css" />
+      <link rel="stylesheet" type="text/css" href="/esp/files/css/espdefault.css" />
+      <link rel="stylesheet" type="text/css" href="/esp/files/css/eclwatch.css" />
+      <script type="text/javascript" src="/esp/files/scripts/espdefault.js">&#160;</script>
+      <title>Add User Result</title>
+        </head>
+    <body class="yui-skin-sam" onload="nof5();">
+            <xsl:apply-templates/>
+        </body>
+        </html>
+    </xsl:template>
+    <xsl:template match="AddUserResponse">
+<table>
+<tbody>
+<th align="left">
+<h2>Add User Result</h2>
+</th>
+<tr>
+<td>
+        <xsl:choose>
+            <xsl:when test="retcode=0">
+            </xsl:when>
+            <xsl:otherwise>
+            Error happened while adding user.
+            </xsl:otherwise>
+        </xsl:choose>
+        <xsl:value-of select="retmsg"/>
+</td>
+</tr>
+<tr>
+<td>
+<br/>
+<br/>
+<a href="javascript:go('/esp/files_/useradd.html')">Add another user</a>
+<br/>
+<a href="javascript:go('/ws_access/Users')">Users</a></td>
+</tr>
+</tbody>
+</table>
+
+    </xsl:template>
+</xsl:stylesheet>

+ 133 - 0
esp/eclwatch/ws_XSLT/access_basedns.xslt

@@ -0,0 +1,133 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Copyright (C) <2010>  <LexisNexis Risk Data Management Inc.>
+
+    All rights reserved. This program is NOT PRESENTLY free software: you can NOT redistribute it and/or modify
+    it under the terms of the GNU Affero General Public License as
+    published by the Free Software Foundation, either version 3 of the
+    License, or (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU Affero General Public License for more details.
+
+    You should have received a copy of the GNU Affero General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+-->
+
+    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+    <xsl:output method="html"/>
+    <xsl:template match="/BasednsResponse">
+        <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+        <head>
+            <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+            <title>Permissions</title>
+      <link rel="stylesheet" type="text/css" href="/esp/files/yui/build/fonts/fonts-min.css" />
+      <link rel="stylesheet" type="text/css" href="/esp/files/css/espdefault.css" />
+      <link rel="stylesheet" type="text/css" href="/esp/files/css/eclwatch.css" />
+      <link type="text/css" rel="StyleSheet" href="files_/css/sortabletable.css"/>
+      <script type="text/javascript" src="/esp/files/scripts/espdefault.js">&#160;</script>
+      <script type="text/javascript" src="files_/scripts/sortabletable.js">
+                <xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
+            </script>
+            <script language="JavaScript1.2" src="files_/scripts/multiselect.js">
+                <xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
+            </script>
+            <script language="JavaScript1.2">
+            <xsl:text disable-output-escaping="yes"><![CDATA[
+                function getSelected(o)
+                {
+                    if (o.tagName=='INPUT' && o.type == 'checkbox' && o.value != 'on')
+                        return o.checked ? '\n'+o.value : '';
+
+                    var s='';
+                    var ch=o.children;
+                    if (ch)
+                        for (var i in ch)
+                            s=s+getSelected(ch[i]);
+                    return s;
+                }
+
+                function onLoad()
+                {
+                    initSelection('resultsTable');
+                    var table = document.getElementById('resultsTable');
+                    if (table)
+                        sortableTable = new SortableTable(table, table, ["String", "None"]);
+                }
+
+                function onSubmit(o, theaction)
+                {
+                    document.forms[0].action = ""+theaction;
+                    return true;
+                }
+                var sortableTable = null;
+            ]]></xsl:text>
+            </script>
+        </head>
+    <body class="yui-skin-sam" onload="nof5();onLoad()">
+            <h3>Permissions</h3>
+            <p/>
+            <xsl:choose>
+                <xsl:when test="not(Basedns/Basedn[1])">
+          <h4>No permission found.</h4>
+                </xsl:when>
+                <xsl:otherwise>
+                    <xsl:apply-templates/>
+                </xsl:otherwise>
+            </xsl:choose>
+        </body>
+        </html>
+    </xsl:template>
+
+    <xsl:template match="Basedns">
+        <table class="sort-table" id="resultsTable">
+        <colgroup>
+            <col width="300"/>
+            <col width="300"/>
+            <col width="100"/>
+        </colgroup>
+        <thead>
+        <tr class="grey">
+        <th align="left">Name</th>
+        <th align="left">BaseDN</th>
+        <th>Operation</th>
+        </tr>
+        </thead>
+        <tbody>
+        <xsl:apply-templates select="Basedn">
+            <xsl:sort select="name"/>
+        </xsl:apply-templates>
+        </tbody>
+        </table>
+    </xsl:template>
+
+    <xsl:template match="Basedn">
+        <tr onmouseenter="this.bgColor = '#F0F0FF'">
+        <xsl:choose>
+            <xsl:when test="position() mod 2">
+                <xsl:attribute name="bgColor">#FFFFFF</xsl:attribute>
+                <xsl:attribute name="onmouseleave">this.bgColor = '#FFFFFF'</xsl:attribute>
+            </xsl:when>
+            <xsl:otherwise>
+                <xsl:attribute name="bgColor">#F0F0F0</xsl:attribute>
+                <xsl:attribute name="onmouseleave">this.bgColor = '#F0F0F0'</xsl:attribute>
+            </xsl:otherwise>
+        </xsl:choose>
+        <td align="left">
+        <xsl:value-of select="name"/>
+        </td>
+        <td align="left">
+        <xsl:value-of select="basedn"/>
+        </td>
+        <td align="center">
+            <a href="javascript:go('/ws_access/Resources?basedn={basedn}&amp;rtype={rtype}&amp;rtitle={rtitle}')">edit</a>
+        </td>
+        </tr>
+    </xsl:template>
+
+    <xsl:template match="*|@*|text()"/>
+
+</xsl:stylesheet>

+ 307 - 0
esp/eclwatch/ws_XSLT/access_filepermission.xslt

@@ -0,0 +1,307 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Copyright (C) <2010>  <LexisNexis Risk Data Management Inc.>
+
+    All rights reserved. This program is NOT PRESENTLY free software: you can NOT redistribute it and/or modify
+    it under the terms of the GNU Affero General Public License as
+    published by the Free Software Foundation, either version 3 of the
+    License, or (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU Affero General Public License for more details.
+
+    You should have received a copy of the GNU Affero General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+-->
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
+<xsl:output method="html"/>
+    <xsl:output method="html"/>
+    <xsl:variable name="usernameselected" select="FilePermissionResponse/UserName"/>
+  <xsl:variable name="groupnameselected" select="FilePermissionResponse/GroupName"/>
+  <xsl:template match="/">
+        <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+        <head>
+            <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+            <title>Check File Permission</title>
+      <link rel="stylesheet" type="text/css" href="/esp/files/yui/build/fonts/fonts-min.css" />
+      <link rel="stylesheet" type="text/css" href="/esp/files/css/espdefault.css" />
+      <link rel="stylesheet" type="text/css" href="/esp/files/css/eclwatch.css" />
+      <script type="text/javascript" src="/esp/files/scripts/espdefault.js">&#160;</script>
+      <script language="JavaScript1.2">
+            <xsl:text disable-output-escaping="yes"><![CDATA[
+                function permChange(f, i)
+                {
+                    if(i.name == "allow_access")
+                    {
+                        if(i.checked)
+                        {
+                            f.deny_access.checked=false;
+                            f.deny_full.checked=false;
+                        }
+                        else
+                            f.allow_full.checked = false;
+                    }
+                    else if(i.name == "allow_read")
+                    {
+                        if(i.checked)
+                        {
+                            f.deny_read.checked=false;
+                            f.deny_full.checked=false;
+                        }
+                        else
+                            f.allow_full.checked = false;
+                    }
+                    else if(i.name == "allow_write")
+                    {
+                        if(i.checked)
+                        {
+                            f.deny_write.checked=false;
+                            f.deny_full.checked=false;
+                        }
+                        else
+                            f.allow_full.checked = false;
+                    }
+                    else if(i.name == "allow_full")
+                    {
+                        if(i.checked)
+                        {
+                            f.deny_access.checked=false;
+                            f.deny_read.checked=false;
+                            f.deny_write.checked=false;
+                            f.deny_full.checked=false;
+                            f.allow_access.checked = true;
+                            f.allow_read.checked = true;
+                            f.allow_write.checked = true;
+                        }
+                    }
+                    else if(i.name == "deny_access")
+                    {
+                        if(i.checked)
+                        {
+                            f.allow_access.checked=false;
+                            f.allow_full.checked=false;
+                        }
+                        else
+                            f.deny_full.checked = false;
+                    }
+                    else if(i.name == "deny_read")
+                    {
+                        if(i.checked)
+                        {
+                            f.allow_read.checked=false;
+                            f.allow_full.checked=false;
+                        }
+                        else
+                            f.deny_full.checked = false;
+                    }
+                    else if(i.name == "deny_write")
+                    {
+                        if(i.checked)
+                        {
+                            f.allow_write.checked=false;
+                            f.allow_full.checked=false;
+                        }
+                        else
+                            f.deny_full.checked = false;
+                    }
+                    else if(i.name == "deny_full")
+                    {
+                        if(i.checked)
+                        {
+                            f.allow_access.checked=false;
+                            f.allow_read.checked=false;
+                            f.allow_write.checked=false;
+                            f.allow_full.checked=false;
+                            f.deny_access.checked = true;
+                            f.deny_read.checked = true;
+                            f.deny_write.checked = true;
+                        }
+                    }
+
+                }
+
+                function validateInput(id)
+                {
+                    fm = document.forms[0];
+                    //if((fm.user.value != '' || fm.group.value != '') &&                               (fm.allow_read.checked || fm.allow_write.checked || fm.allow_full.checked
+                    //   || fm.deny_read.checked || fm.deny_write.checked || fm.deny_full.checked || fm.allow_access.checked || fm.deny_access.checked))
+                    if (id == 1 && fm.UserName.value != '')
+                        fm.GroupName.value = '';
+                    if (id == 2 && fm.GroupName.value != '')
+                        fm.UserName.value = '';
+
+                    if((fm.UserName.value != '' || fm.GroupName.value != '') && (fm.FileName.value != ''))
+                    {
+                        fm.submit.disabled = false;
+                    }
+                    else
+                    {
+                        fm.submit.disabled = true;
+                    }
+                }
+
+            ]]></xsl:text>
+            </script>
+
+        </head>
+    <body class="yui-skin-sam" onload="nof5();">
+            <xsl:apply-templates/>
+        </body>
+        </html>
+    </xsl:template>
+
+    <xsl:template match="FilePermissionResponse">
+        <form id="permissionform" method="POST" action="/ws_access/FilePermission">
+        <table style="text-align:left;" cellspacing="10" name="table1">
+            <tr>
+                <th colspan="2">
+                    <h3>Check File Permission</h3>
+                </th>
+            </tr>
+            <tr>
+                <td height="5"></td>
+            </tr>
+            <tr>
+                <th>File Name:</th>
+                <td>
+                <input type="text" size="50" name="FileName" value="{FileName}" onKeyUp="validateInput(0)"/>
+                </td>
+            </tr>
+            <tr>
+                <xsl:choose>
+                <xsl:when test="toomany=1">
+                    <th>User:</th>
+                    <td>
+                    <input size="20" name="UserName" onKeyUp="validateInput(1)"/>
+                    </td>
+                </xsl:when>
+                <xsl:otherwise>
+                    <th>Select User:</th>
+                    <td>
+                    <select size="1" name="UserName" onChange="validateInput(1)">
+                        <option value="">none</option>
+                        <xsl:apply-templates select="Users"/>
+                    </select>
+                    </td>
+                </xsl:otherwise>
+                </xsl:choose>
+            </tr>
+            <tr>
+                <th>Or group:</th>
+                <td>
+                <select size="1" name="GroupName" onChange="validateInput(2)">
+                    <option value="">none</option>
+                    <xsl:apply-templates select="Groups"/>
+                </select>
+                </td>
+            </tr>
+
+            <!--tr>
+                <th>allow:</th>
+                <td>
+                    <table>
+                        <tr>
+                        </tr>
+                        <tr>
+                            <td width="50">access</td>
+                            <td width="50">read</td>
+                            <td width="50">write</td>
+                            <td width="50">full</td>
+                        </tr>
+                        <tr>
+                            <td width="50"><input type="checkbox" name="allow_access" value="1" onClick="permChange(this.form,this);validateInput()"/></td>
+                            <td width="50"><input type="checkbox" name="allow_read" value="1" onClick="permChange(this.form,this);validateInput()"/></td>
+                            <td width="50"><input type="checkbox" name="allow_write" value="1" onClick="permChange(this.form,this);validateInput()"/></td>
+                            <td width="50"><input type="checkbox" name="allow_full" value="1" onClick="permChange(this.form,this);validateInput()"/></td>
+                        </tr>
+                    </table>
+                </td>
+            </tr>
+
+            <tr>
+                <th>deny:</th>
+                <td>
+                    <table>
+                        <tr>
+                        </tr>
+                        <tr>
+                            <td width="50">access</td>
+                            <td width="50">read</td>
+                            <td width="50">write</td>
+                            <td width="50">full</td>
+                        </tr>
+                        <tr>
+                            <td width="50"><input type="checkbox" name="deny_access" value="1" onClick="permChange(this.form,this);validateInput()"/></td>
+                            <td width="50"><input type="checkbox" name="deny_read" value="1" onClick="permChange(this.form,this);validateInput()"/></td>
+                            <td width="50"><input type="checkbox" name="deny_write" value="1" onClick="permChange(this.form,this);validateInput()"/></td>
+                            <td width="50"><input type="checkbox" name="deny_full" value="1" onClick="permChange(this.form,this);validateInput()"/></td>
+                        </tr>
+                    </table>
+                </td>
+            </tr-->
+
+            <xsl:if test="string-length(UserPermission)">
+                <tr>
+                    <td height="5"></td>
+                </tr>
+                <tr><th>Permission:</th><td><xsl:value-of select="UserPermission"/></td></tr>
+         </xsl:if>
+
+            <tr>
+                <td height="5"></td>
+            </tr>
+
+            <tr>
+                <td></td>
+                <td>
+                <input type="submit" class="sbutton" value="  Check  " name="submit" disabled="true"/>
+                </td>
+            </tr>
+            </table>
+        </form>
+    </xsl:template>
+
+    <xsl:template match="Users">
+        <xsl:apply-templates select="User">
+            <xsl:sort select="username"/>
+        </xsl:apply-templates>
+    </xsl:template>
+
+    <xsl:template match="User">
+        <xsl:choose>
+            <xsl:when test="$usernameselected=username">
+                        <option value="{username}" selected="selected"><xsl:value-of select="username"/></option>
+            </xsl:when>
+            <xsl:otherwise>
+                        <option value="{username}"><xsl:value-of select="username"/></option>
+            </xsl:otherwise>
+        </xsl:choose>
+    </xsl:template>
+
+    <xsl:template match="Groups">
+        <xsl:apply-templates select="Group">
+            <xsl:sort select="name"/>
+        </xsl:apply-templates>
+    </xsl:template>
+
+    <xsl:template match="Group">
+    <!--option value="{name}"><xsl:value-of select="name"/></option-->
+    <xsl:choose>
+      <xsl:when test="$groupnameselected=name">
+        <option value="{name}" selected="selected">
+          <xsl:value-of select="name"/>
+        </option>
+      </xsl:when>
+      <xsl:otherwise>
+        <option value="{name}">
+          <xsl:value-of select="name"/>
+        </option>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+</xsl:stylesheet>

+ 68 - 0
esp/eclwatch/ws_XSLT/access_groupadd.xslt

@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Copyright (C) <2010>  <LexisNexis Risk Data Management Inc.>
+
+    All rights reserved. This program is NOT PRESENTLY free software: you can NOT redistribute it and/or modify
+    it under the terms of the GNU Affero General Public License as
+    published by the Free Software Foundation, either version 3 of the
+    License, or (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU Affero General Public License for more details.
+
+    You should have received a copy of the GNU Affero General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+-->
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
+<xsl:output method="html"/>
+    <xsl:output method="html"/>
+    <xsl:template match="/">
+        <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+        <head>
+            <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+            <title>Add Group Result</title>
+      <link rel="stylesheet" type="text/css" href="/esp/files/yui/build/fonts/fonts-min.css" />
+      <link rel="stylesheet" type="text/css" href="/esp/files/css/espdefault.css" />
+      <link rel="stylesheet" type="text/css" href="/esp/files/css/eclwatch.css" />
+      <script type="text/javascript" src="/esp/files/scripts/espdefault.js">&#160;</script>
+    </head>
+    <body class="yui-skin-sam" onload="nof5();">
+            <xsl:apply-templates/>
+        </body>
+        </html>
+    </xsl:template>
+    <xsl:template match="GroupAddResponse">
+<table>
+<tbody>
+<th align="left">
+<h2>Add Group Result</h2>
+</th>
+<tr>
+<td>
+        <xsl:choose>
+            <xsl:when test="retcode=0">
+            Group <xsl:value-of select="groupname"/> has been added successfully.
+            </xsl:when>
+            <xsl:otherwise>
+            Failed to add group <xsl:value-of select="groupname"/>, <xsl:value-of select="retmsg"/>
+            </xsl:otherwise>
+        </xsl:choose>
+</td>
+</tr>
+<tr>
+<td>
+<br/>
+<br/>
+<a href="javascript:go('/esp/files_/groupadd.html')">Add another group</a>
+<br/>
+<a href="javascript:go('/ws_access/Groups')">Groups</a></td>
+</tr>
+</tbody>
+</table>
+
+    </xsl:template>
+</xsl:stylesheet>

+ 133 - 0
esp/eclwatch/ws_XSLT/access_groupdelete.xslt

@@ -0,0 +1,133 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Copyright (C) <2010>  <LexisNexis Risk Data Management Inc.>
+
+    All rights reserved. This program is NOT PRESENTLY free software: you can NOT redistribute it and/or modify
+    it under the terms of the GNU Affero General Public License as
+    published by the Free Software Foundation, either version 3 of the
+    License, or (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU Affero General Public License for more details.
+
+    You should have received a copy of the GNU Affero General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+-->
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
+<xsl:output method="html"/>
+    <xsl:output method="html"/>
+    <xsl:variable name="groupnamestr" select="/GroupDeleteResponse/Groupnames"/>
+    <xsl:template match="/">
+        <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+        <head>
+      <link rel="stylesheet" type="text/css" href="/esp/files/yui/build/fonts/fonts-min.css" />
+      <link rel="stylesheet" type="text/css" href="/esp/files/css/espdefault.css" />
+      <link rel="stylesheet" type="text/css" href="/esp/files/css/eclwatch.css" />
+      <script type="text/javascript" src="/esp/files/scripts/espdefault.js">&#160;</script>
+      <link type="text/css" rel="StyleSheet" href="files_/css/list.css"/>
+                <script language="JavaScript1.2">
+                         var groupnamestr = '<xsl:value-of select="$groupnamestr"/>';
+                   <xsl:text disable-output-escaping="yes"><![CDATA[
+                                 function btnclicked(action)
+                         {
+                                    if (action < 1 || groupnamestr=='')
+                                        document.location.href='/ws_access/Groups';
+                                    else
+                                        document.location.href='/ws_access/GroupDelete?'+groupnamestr;
+                         }
+
+                   ]]></xsl:text>
+                </script>
+            <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+            <title>Delete Group Result</title>
+        </head>
+    <body class="yui-skin-sam" onload="nof5();">
+            <xsl:apply-templates/>
+        </body>
+        </html>
+    </xsl:template>
+
+    <xsl:template match="GroupDeleteResponse">
+        <xsl:choose>
+            <xsl:when test="not(Permissions/Permission[1])">
+                <table>
+                    <tbody>
+                        <th align="left">
+                            <h2>Delete Group Result</h2>
+                        </th>
+                        <tr>
+                            <td>
+                                <xsl:choose>
+                                    <xsl:when test="retcode=0">
+                                        Groups have been deleted successfully.
+                                    </xsl:when>
+                                    <xsl:otherwise>
+                                        Failed to delete groups, <xsl:value-of select="retmsg"/>
+                                    </xsl:otherwise>
+                                </xsl:choose>
+                            </td>
+                        </tr>
+                        <tr>
+                            <td>
+                            <br/>
+                            <br/>
+                            <a href="javascript:go('/ws_access/Groups')">Groups</a></td>
+                        </tr>
+                    </tbody>
+                </table>
+            </xsl:when>
+            <xsl:otherwise>
+                <h4><b>The permissions associated with the group(s) will also be deleted.</b></h4>
+                <table>
+                    <tr>
+                        <td colspan="4">
+                            <table class="list" width="500">
+                                <colgroup style="vertical-align:top;">
+                                    <col/>
+                                    <col/>
+                                    <col/>
+                                </colgroup>
+                                <tr class="grey"><th>Group</th><th>Resource Type</th><th>Resource Name</th></tr>
+                                <xsl:apply-templates select="Permissions/Permission">
+                                    <xsl:sort select="Group" data-type="number"/>
+                                </xsl:apply-templates>
+                            </table>
+                        </td>
+                    </tr>
+                    <tr>
+                        <td><br/>
+                        </td>
+                    </tr>
+                    <tr>
+                        <td>
+                            <input type="submit" class="sbutton" id="Continue" value="ContinueDelete" onclick="btnclicked(1)"/>
+                        </td>
+                        <td>
+                            <input type="submit" class="sbutton" id="Cancel" value="CancelDelete" onclick="btnclicked(0)"/>
+                        </td>
+                    </tr>
+                    <tr>
+                        <td>
+                            <br/>
+                            <br/>
+                            <a href="javascript:go('/ws_access/Groups')">Groups</a>
+                        </td>
+                    </tr>
+                </table>
+            </xsl:otherwise>
+        </xsl:choose>
+    </xsl:template>
+
+    <xsl:template match="Permission">
+        <tr>
+            <td><xsl:value-of select="PermissionName"/></td>
+            <td><xsl:value-of select="RType"/></td>
+            <td><xsl:value-of select="ResourceName"/></td>
+        </tr>
+    </xsl:template>
+
+</xsl:stylesheet>

+ 168 - 0
esp/eclwatch/ws_XSLT/access_groupedit.xslt

@@ -0,0 +1,168 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Copyright (C) <2010>  <LexisNexis Risk Data Management Inc.>
+
+    All rights reserved. This program is NOT PRESENTLY free software: you can NOT redistribute it and/or modify
+    it under the terms of the GNU Affero General Public License as
+    published by the Free Software Foundation, either version 3 of the
+    License, or (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU Affero General Public License for more details.
+
+    You should have received a copy of the GNU Affero General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+-->
+
+    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+    <xsl:output method="html"/>
+    <xsl:template match="/GroupEditResponse">
+        <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+        <head>
+            <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+            <title>Editing User</title>
+      <link rel="stylesheet" type="text/css" href="/esp/files/yui/build/fonts/fonts-min.css" />
+      <link rel="stylesheet" type="text/css" href="/esp/files/css/espdefault.css" />
+      <link rel="stylesheet" type="text/css" href="/esp/files/css/eclwatch.css" />
+      <link type="text/css" rel="StyleSheet" href="files_/css/sortabletable.css"/>
+      <script type="text/javascript" src="/esp/files/scripts/espdefault.js">&#160;</script>
+      <script type="text/javascript" src="files_/scripts/sortabletable.js">
+                <xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
+            </script>
+            <script language="JavaScript1.2" src="files_/scripts/multiselect.js">
+                <xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
+            </script>
+            <script language="JavaScript1.2">
+            <xsl:text disable-output-escaping="yes"><![CDATA[
+                function onRowCheck(checked)
+                {
+                    document.getElementById('deleteBtn').disabled = checkedCount == 0;
+                    document.getElementById('addBtn').disabled = checkedCount != 0;
+                }
+
+                function getSelected(o)
+                {
+                    if (o.tagName=='INPUT' && o.type == 'checkbox' && o.value != 'on')
+                        return o.checked ? '\n'+o.value : '';
+
+                    var s='';
+                    var ch=o.children;
+                    if (ch)
+                        for (var i in ch)
+                            s=s+getSelected(ch[i]);
+                    return s;
+                }
+
+                function onLoad()
+                {
+                    initSelection('resultsTable');
+                    var table = document.getElementById('resultsTable');
+                    if (table)
+                        sortableTable = new SortableTable(table, table, ["None", "String"]);
+                }
+
+                function onSubmit(o, theaction)
+                {
+                    document.forms[0].action = ""+theaction;
+                    return true;
+                }
+                var sortableTable = null;
+            ]]></xsl:text>
+            </script>
+        </head>
+    <body class="yui-skin-sam" onload="nof5();onLoad()">
+            <h3>Group <xsl:value-of select="groupname"/> has the following members:</h3>
+            <p/>
+            <form id="listitems" action="/ws_access/GroupMemberEdit">
+            <xsl:apply-templates select="Users"/>
+            <input type="hidden" name="groupname" value="{groupname}"/>
+            <table id="btnTable" style="margin:20 0 0 0">
+            <colgroup>
+                <col span="8" width="100"/>
+            </colgroup>
+            <tr>
+            <td>
+                <input type="submit" class="sbutton" id="deleteBtn" name="action" value="Delete" disabled="true" onclick="return confirm('Are you sure you want to delete the following members(s) from group ?\n\n'+getSelected(document.forms['listitems']).substring(1,1000))"/>
+            </td>
+            <td>
+                <input type="button" class="sbutton" id="addBtn" name="action" value="  Add  " onClick="forms['add'].submit()"/>
+            </td>
+            </tr>
+            </table>
+            </form>
+            <form id="add" action="/ws_access/GroupMemberEditInput">
+            <input type="hidden" name="groupname" value="{groupname}"/>
+            </form>
+        </body>
+        </html>
+    </xsl:template>
+
+    <xsl:template match="Users">
+        <table class="sort-table" id="resultsTable">
+        <colgroup>
+            <col width="5"/>
+            <col width="150"/>
+        </colgroup>
+        <thead>
+        <tr class="grey">
+        <th id="selectAll1">
+        <xsl:if test="User[2]">
+            <!--xsl:attribute name="name">selectAll1</xsl:attribute-->
+            <input type="checkbox" title="Select or deselect all groups" onclick="selectAll(this.checked)"/>
+        </xsl:if>
+        </th>
+        <th>
+            User ID
+        </th>
+        </tr>
+        </thead>
+        <tbody>
+        <xsl:apply-templates select="User">
+            <xsl:sort select="username"/>
+        </xsl:apply-templates>
+        </tbody>
+        </table>
+        <xsl:if test="User[2]">
+            <table class="select-all">
+            <tr>
+            <th id="selectAll2">
+            <input type="checkbox" title="Select or deselect all groups" onclick="selectAll(this.checked)"/>
+            </th>
+            <th align="left" colspan="7">Select All / None</th>
+            </tr>
+            </table>
+        </xsl:if>
+        <table id="btnTable" style="margin:20 0 0 0">
+        <colgroup>
+            <col span="8" width="100"/>
+        </colgroup>
+        </table>
+    </xsl:template>
+
+    <xsl:template match="User">
+        <tr onmouseenter="this.bgColor = '#F0F0FF'">
+        <xsl:choose>
+            <xsl:when test="position() mod 2">
+                <xsl:attribute name="bgColor">#FFFFFF</xsl:attribute>
+                <xsl:attribute name="onmouseleave">this.bgColor = '#FFFFFF'</xsl:attribute>
+            </xsl:when>
+            <xsl:otherwise>
+                <xsl:attribute name="bgColor">#F0F0F0</xsl:attribute>
+                <xsl:attribute name="onmouseleave">this.bgColor = '#F0F0F0'</xsl:attribute>
+            </xsl:otherwise>
+        </xsl:choose>
+        <td>
+        <input type="checkbox" name="usernames_i{position()}" value="{username}" onclick="return clicked(this)"/>
+        </td>
+        <td align="left">
+        <xsl:value-of select="username"/>
+        </td>
+        </tr>
+    </xsl:template>
+
+    <xsl:template match="*|@*|text()"/>
+
+</xsl:stylesheet>

+ 67 - 0
esp/eclwatch/ws_XSLT/access_groupmemberedit.xslt

@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Copyright (C) <2010>  <LexisNexis Risk Data Management Inc.>
+
+    All rights reserved. This program is NOT PRESENTLY free software: you can NOT redistribute it and/or modify
+    it under the terms of the GNU Affero General Public License as
+    published by the Free Software Foundation, either version 3 of the
+    License, or (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU Affero General Public License for more details.
+
+    You should have received a copy of the GNU Affero General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+-->
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
+<xsl:output method="html"/>
+    <xsl:output method="html"/>
+    <xsl:template match="/">
+        <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+        <head>
+            <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+            <title>Group member edit Result</title>
+      <link rel="stylesheet" type="text/css" href="/esp/files/yui/build/fonts/fonts-min.css" />
+      <link rel="stylesheet" type="text/css" href="/esp/files/css/espdefault.css" />
+      <link rel="stylesheet" type="text/css" href="/esp/files/css/eclwatch.css" />
+      <script type="text/javascript" src="/esp/files/scripts/espdefault.js">&#160;</script>
+    </head>
+    <body class="yui-skin-sam" onload="nof5();">
+            <xsl:apply-templates/>
+        </body>
+        </html>
+    </xsl:template>
+    <xsl:template match="GroupMemberEditResponse">
+<table>
+<tbody>
+<th align="left">
+<h2>Group Member Edit Result</h2>
+</th>
+<tr>
+<td>
+        <xsl:choose>
+            <xsl:when test="retcode=0">
+            </xsl:when>
+            <xsl:otherwise>
+            Error,
+            </xsl:otherwise>
+        </xsl:choose>
+        <xsl:value-of select="retmsg"/>
+</td>
+</tr>
+<tr>
+<td>
+<br/>
+<br/>
+<a href="javascript:go('/ws_access/Groups?')">Groups</a>
+</td>
+</tr>
+</tbody>
+</table>
+
+    </xsl:template>
+</xsl:stylesheet>

+ 169 - 0
esp/eclwatch/ws_XSLT/access_groupmembereditinput.xslt

@@ -0,0 +1,169 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Copyright (C) <2010>  <LexisNexis Risk Data Management Inc.>
+
+    All rights reserved. This program is NOT PRESENTLY free software: you can NOT redistribute it and/or modify
+    it under the terms of the GNU Affero General Public License as
+    published by the Free Software Foundation, either version 3 of the
+    License, or (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU Affero General Public License for more details.
+
+    You should have received a copy of the GNU Affero General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+-->
+
+    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+    <xsl:output method="html"/>
+    <xsl:template match="/GroupMemberEditInputResponse">
+        <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+        <head>
+            <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+            <title>Editing Group Members</title>
+      <link rel="stylesheet" type="text/css" href="/esp/files/yui/build/fonts/fonts-min.css" />
+      <link rel="stylesheet" type="text/css" href="/esp/files/css/espdefault.css" />
+      <link rel="stylesheet" type="text/css" href="/esp/files/css/eclwatch.css" />
+      <link type="text/css" rel="StyleSheet" href="files_/css/sortabletable.css"/>
+      <script type="text/javascript" src="/esp/files/scripts/espdefault.js">&#160;</script>
+      <script type="text/javascript" src="files_/scripts/sortabletable.js">
+                <xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
+            </script>
+            <script language="JavaScript1.2" src="files_/scripts/multiselect.js">
+                <xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
+            </script>
+            <script language="JavaScript1.2">
+            <xsl:text disable-output-escaping="yes"><![CDATA[
+                function onRowCheck(checked)
+                {
+                    document.getElementById('addBtn').disabled = checkedCount == 0;
+                }
+
+                function getSelected(o)
+                {
+                    if (o.type == 'checkbox' && o.value != 'on')
+                        return o.checked ? '\n'+o.value : '';
+
+                    var s='';
+                    var ch=o.children;
+                    if (ch)
+                        for (var i in ch)
+                            s=s+getSelected(ch[i]);
+                    return s;
+                }
+
+                function onLoad()
+                {
+                    initSelection('resultsTable');
+                    var table = document.getElementById('resultsTable');
+                    if (table)
+                        sortableTable = new SortableTable(table, table, ["None", "String"]);
+                }
+
+                function onSubmit(o, theaction)
+                {
+                    document.forms[0].action = ""+theaction;
+                    return true;
+                }
+                var sortableTable = null;
+            ]]></xsl:text>
+            </script>
+        </head>
+    <body class="yui-skin-sam" onload="nof5();onLoad()">
+            <h3>Add members to group <xsl:value-of select="username"/>:</h3>
+            <p/>
+            <xsl:choose>
+            <xsl:when test="toomany=1">
+<form action="/ws_access/GroupMemberEditInput">
+<input type="hidden" name="groupname" value="{groupname}"/>
+<table>
+        <tr><td><b>Search User: </b></td><td><input type="text" name="searchinput" size="20" value="" /></td></tr>
+        <tr><td></td><td><input type="submit" value="search" name="S1" /></td></tr>
+</table>
+</form>
+            </xsl:when>
+            <xsl:otherwise>
+                <form id="listitems" action="/ws_access/GroupMemberEdit">
+                <input type="hidden" name="groupname" value="{groupname}"/>
+                <xsl:apply-templates/>
+                </form>
+            </xsl:otherwise>
+            </xsl:choose>
+        </body>
+        </html>
+    </xsl:template>
+
+    <xsl:template match="Users">
+        <table class="sort-table" id="resultsTable">
+        <colgroup>
+            <col width="5"/>
+            <col width="150"/>
+        </colgroup>
+        <thead>
+        <tr class="grey">
+        <th>
+        <xsl:if test="User[2]">
+            <xsl:attribute name="name">selectAll1</xsl:attribute>
+            <input type="checkbox" title="Select or deselect all groups" onclick="selectAll(this.checked)"/>
+        </xsl:if>
+        </th>
+        <th>
+            User ID
+        </th>
+        </tr>
+        </thead>
+        <tbody>
+        <xsl:apply-templates select="User">
+            <xsl:sort select="username"/>
+        </xsl:apply-templates>
+        </tbody>
+        </table>
+        <xsl:if test="User[2]">
+            <table class="select-all">
+            <tr>
+            <th id="selectAll2">
+            <input type="checkbox" title="Select or deselect all groups" onclick="selectAll(this.checked)"/>
+            </th>
+            <th align="left" colspan="7">Select All / None</th>
+            </tr>
+            </table>
+        </xsl:if>
+        <table id="btnTable" style="margin:20 0 0 0">
+        <colgroup>
+            <col span="8" width="100"/>
+        </colgroup>
+        <tr>
+        <td>
+        <input type="submit" class="sbutton" id="addBtn" name="action" value="Add" disabled="true" onclick="return confirm('Are you sure you want to add the following members to the group ?\n\n'+getSelected(document.forms['listitems']).substring(1,1000))"/>
+        </td>
+        </tr>
+        </table>
+    </xsl:template>
+
+    <xsl:template match="User">
+        <tr onmouseenter="this.bgColor = '#F0F0FF'">
+        <xsl:choose>
+            <xsl:when test="position() mod 2">
+                <xsl:attribute name="bgColor">#FFFFFF</xsl:attribute>
+                <xsl:attribute name="onmouseleave">this.bgColor = '#FFFFFF'</xsl:attribute>
+            </xsl:when>
+            <xsl:otherwise>
+                <xsl:attribute name="bgColor">#F0F0F0</xsl:attribute>
+                <xsl:attribute name="onmouseleave">this.bgColor = '#F0F0F0'</xsl:attribute>
+            </xsl:otherwise>
+        </xsl:choose>
+        <td>
+        <input type="checkbox" name="usernames_i{position()}" value="{username}" onclick="return clicked(this)"/>
+        </td>
+        <td align="left">
+        <xsl:value-of select="username"/>
+        </td>
+        </tr>
+    </xsl:template>
+
+    <xsl:template match="*|@*|text()"/>
+
+</xsl:stylesheet>

+ 213 - 0
esp/eclwatch/ws_XSLT/access_groups.xslt

@@ -0,0 +1,213 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Copyright (C) <2010>  <LexisNexis Risk Data Management Inc.>
+
+    All rights reserved. This program is NOT PRESENTLY free software: you can NOT redistribute it and/or modify
+    it under the terms of the GNU Affero General Public License as
+    published by the Free Software Foundation, either version 3 of the
+    License, or (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU Affero General Public License for more details.
+
+    You should have received a copy of the GNU Affero General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+-->
+
+    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+    <xsl:output method="html"/>
+    <xsl:template match="/GroupResponse">
+        <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+        <head>
+            <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+            <title>Groups</title>
+      <link rel="stylesheet" type="text/css" href="/esp/files/yui/build/fonts/fonts-min.css" />
+      <link rel="stylesheet" type="text/css" href="/esp/files/css/espdefault.css" />
+      <link rel="stylesheet" type="text/css" href="/esp/files/css/eclwatch.css" />
+      <script type="text/javascript" src="/esp/files/scripts/espdefault.js">&#160;</script>
+      <link type="text/css" rel="StyleSheet" href="files_/css/sortabletable.css"/>
+            <script type="text/javascript" src="files_/scripts/sortabletable.js">
+                <xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
+            </script>
+            <script language="JavaScript1.2" src="files_/scripts/multiselect.js">
+                <xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
+            </script>
+            <script language="JavaScript1.2">
+            <xsl:text disable-output-escaping="yes"><![CDATA[
+                function onRowCheck(checked)
+                {
+                    document.getElementById('listitems').deleteBtn.disabled = checkedCount == 0;
+          document.getElementById("listitems").exportBtn.disabled = checkedCount == 0;
+                    document.getElementById('listitems').addBtn.disabled = checkedCount != 0;
+                }
+
+                function getSelected(o)
+                {
+                    if (o.tagName=='INPUT' && o.type == 'checkbox' && o.value != 'on')
+                        return o.checked ? '\n'+o.value : '';
+
+                    var s='';
+                    var ch=o.children;
+                    if (ch)
+                        for (var i in ch)
+                            s=s+getSelected(ch[i]);
+                    return s;
+                }
+
+                function onLoad()
+                {
+                    initSelection('resultsTable');
+                    var table = document.getElementById('resultsTable');
+                    if (table)
+                        sortableTable = new SortableTable(table, table, ["None", "String", "String", "None"]);
+                }
+
+                function onSubmit(o, theaction)
+                {
+                    document.getElementById('listitems').action = ""+theaction;
+                    return true;
+                }
+
+        function onExport()
+                {
+                    document.getElementById('ActionType').value='Export';
+          document.forms['listitems'].submit();
+                    return true;
+                }
+        function onDelete()
+                {
+          ret = confirm('Are you sure you want to delete the following group(s) ?\n\n'+getSelected(document.getElementById('listitems')).substring(1,1000));
+          if (ret)
+          {
+                      document.getElementById('ActionType').value='Delete';
+            document.forms['listitems'].submit();
+          }
+                    return true;
+                }
+                var sortableTable = null;
+            ]]></xsl:text>
+            </script>
+        </head>
+    <body class="yui-skin-sam" onload="nof5();onLoad()">
+            <h3>Groups</h3>
+      <xsl:choose>
+        <xsl:when test="not(Groups/Group[1])">
+          <table>
+            <tr>
+              <td colspan="4">
+                <b>No group found.</b>
+              </td>
+            </tr>
+            <tr>
+              <td/>
+            </tr>
+            <tr>
+              <td/>
+            </tr>
+            <tr>
+              <td>
+                <input type="button" class="sbutton" id="addBtn" value="  Add  " onClick="javascript:go('/esp/files_/groupadd.html')"/>
+              </td>
+            </tr>
+          </table>
+        </xsl:when>
+        <xsl:otherwise>
+            <form id="listitems" action="/ws_access/GroupAction" method="post">
+        <input type="hidden" id="ActionType" name="ActionType" value="Delete"/>
+            <table class="sort-table" id="resultsTable">
+            <colgroup>
+                <col width="5"/>
+                <col width="150"/>
+                <col width="200"/>
+            </colgroup>
+            <thead>
+            <tr class="grey">
+            <th id="selectAll1">
+            <xsl:if test="Groups/Group[2]">
+                <!--xsl:attribute name="name">selectAll1</xsl:attribute-->
+                <input type="checkbox" title="Select or deselect all groups" onclick="selectAll(this.checked)"/>
+            </xsl:if>
+            </th>
+            <th align="left">name</th>
+            <th>Operation</th>
+            </tr>
+            </thead>
+            <tbody>
+
+            <xsl:apply-templates/>
+
+            </tbody>
+            </table>
+            <xsl:if test="Groups/Group[2]">
+                <table class="select-all">
+                <tr>
+                <th id="selectAll2">
+                <input type="checkbox" title="Select or deselect all groups" onclick="selectAll(this.checked)"/>
+                </th>
+                <th align="left" colspan="7">Select All / None</th>
+                </tr>
+                </table>
+            </xsl:if>
+            <table id="btnTable" style="margin:20 0 0 0">
+            <colgroup>
+                <col span="8" width="100"/>
+            </colgroup>
+            <tr>
+        <td>
+          <input type="button" class="sbutton" id="exportBtn" name="action1" value="Export Users" disabled="true" onclick="return onExport();"/>
+        </td>
+            <td>
+            <input type="button" class="sbutton" id="deleteBtn" name="action" value="Delete" disabled="true" onclick="return onDelete()"/>
+            </td>
+            <td>
+            <input type="button" class="sbutton" id="addBtn" value="  Add  " onClick="javascript:go('/esp/files_/groupadd.html')"/>
+            </td>
+            </tr>
+            </table>
+            </form>
+    </xsl:otherwise>
+    </xsl:choose>
+        </body>
+        </html>
+    </xsl:template>
+
+    <xsl:template match="Groups">
+        <xsl:apply-templates select="Group">
+            <xsl:sort select="name"/>
+        </xsl:apply-templates>
+    </xsl:template>
+
+    <xsl:template match="Group">
+        <tr onmouseenter="this.bgColor = '#F0F0FF'">
+        <xsl:choose>
+            <xsl:when test="position() mod 2">
+                <xsl:attribute name="bgColor">#FFFFFF</xsl:attribute>
+                <xsl:attribute name="onmouseleave">this.bgColor = '#FFFFFF'</xsl:attribute>
+            </xsl:when>
+            <xsl:otherwise>
+                <xsl:attribute name="bgColor">#F0F0F0</xsl:attribute>
+                <xsl:attribute name="onmouseleave">this.bgColor = '#F0F0F0'</xsl:attribute>
+            </xsl:otherwise>
+        </xsl:choose>
+        <td>
+        <input type="checkbox" name="groupnames_i{position()}" value="{name}" onclick="return clicked(this)"/>
+        </td>
+        <td align="left">
+        <xsl:value-of select="name"/>
+        </td>
+        <td>
+      <xsl:if test="name != 'Authenticated Users'">
+        <a href="javascript:go('/ws_access/GroupEdit?groupname={name}')">members</a>
+            <xsl:text disable-output-escaping="yes"> </xsl:text>
+      </xsl:if>
+      <a href="javascript:go('/ws_access/AccountPermissions?IsGroup=true&amp;AccountName={name}')">Permissions</a>
+        </td>
+        </tr>
+    </xsl:template>
+
+    <xsl:template match="*|@*|text()"/>
+
+</xsl:stylesheet>

+ 319 - 0
esp/eclwatch/ws_XSLT/access_permissionaddinput.xslt

@@ -0,0 +1,319 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Copyright (C) <2010>  <LexisNexis Risk Data Management Inc.>
+
+    All rights reserved. This program is NOT PRESENTLY free software: you can NOT redistribute it and/or modify
+    it under the terms of the GNU Affero General Public License as
+    published by the Free Software Foundation, either version 3 of the
+    License, or (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU Affero General Public License for more details.
+
+    You should have received a copy of the GNU Affero General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+-->
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
+<xsl:output method="html"/>
+    <xsl:output method="html"/>
+    <xsl:template match="/">
+        <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+        <head>
+            <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+            <title>Add Permission</title>
+      <link rel="stylesheet" type="text/css" href="/esp/files/yui/build/fonts/fonts-min.css" />
+      <link rel="stylesheet" type="text/css" href="/esp/files/css/espdefault.css" />
+      <link rel="stylesheet" type="text/css" href="/esp/files/css/eclwatch.css" />
+      <script type="text/javascript" src="/esp/files/scripts/espdefault.js">&#160;</script>
+      <script language="JavaScript1.2">
+            <xsl:text disable-output-escaping="yes"><![CDATA[
+                function permChange(f, i)
+                {
+                    if(i.name == "allow_access")
+                    {
+                        if(i.checked)
+                        {
+                            f.deny_access.checked=false;
+                            f.deny_full.checked=false;
+                        }
+                        else
+                            f.allow_full.checked = false;
+                    }
+                    else if(i.name == "allow_read")
+                    {
+                        if(i.checked)
+                        {
+                            f.deny_read.checked=false;
+                            f.deny_full.checked=false;
+                        }
+                        else
+                            f.allow_full.checked = false;
+                    }
+                    else if(i.name == "allow_write")
+                    {
+                        if(i.checked)
+                        {
+                            f.deny_write.checked=false;
+                            f.deny_full.checked=false;
+                        }
+                        else
+                            f.allow_full.checked = false;
+                    }
+                    else if(i.name == "allow_full")
+                    {
+                        if(i.checked)
+                        {
+                            f.deny_access.checked=false;
+                            f.deny_read.checked=false;
+                            f.deny_write.checked=false;
+                            f.deny_full.checked=false;
+                            f.allow_access.checked = true;
+                            f.allow_read.checked = true;
+                            f.allow_write.checked = true;
+                        }
+                    }
+                    else if(i.name == "deny_access")
+                    {
+                        if(i.checked)
+                        {
+                            f.allow_access.checked=false;
+                            f.allow_full.checked=false;
+                        }
+                        else
+                            f.deny_full.checked = false;
+                    }
+                    else if(i.name == "deny_read")
+                    {
+                        if(i.checked)
+                        {
+                            f.allow_read.checked=false;
+                            f.allow_full.checked=false;
+                        }
+                        else
+                            f.deny_full.checked = false;
+                    }
+                    else if(i.name == "deny_write")
+                    {
+                        if(i.checked)
+                        {
+                            f.allow_write.checked=false;
+                            f.allow_full.checked=false;
+                        }
+                        else
+                            f.deny_full.checked = false;
+                    }
+                    else if(i.name == "deny_full")
+                    {
+                        if(i.checked)
+                        {
+                            f.allow_access.checked=false;
+                            f.allow_read.checked=false;
+                            f.allow_write.checked=false;
+                            f.allow_full.checked=false;
+                            f.deny_access.checked = true;
+                            f.deny_read.checked = true;
+                            f.deny_write.checked = true;
+                        }
+                    }
+
+                }
+
+                function validateInput()
+                {
+                    fm = document.forms[0];
+                    if (fm.user && fm.group)
+                    {
+                        if((fm.user.value != '' || fm.group.value != '') &&                             (fm.allow_read.checked || fm.allow_write.checked || fm.allow_full.checked
+                         || fm.deny_read.checked || fm.deny_write.checked || fm.deny_full.checked || fm.allow_access.checked || fm.deny_access.checked))
+                        {
+                            fm.submit.disabled = false;
+                        }
+                        else
+                        {
+                            fm.submit.disabled = true;
+                        }
+                    }
+
+                    if (fm.ResourceName)
+                    {
+                        if((fm.ResourceName.value != '') && (fm.allow_read.checked || fm.allow_write.checked || fm.allow_full.checked
+                         || fm.deny_read.checked || fm.deny_write.checked || fm.deny_full.checked || fm.allow_access.checked || fm.deny_access.checked))
+                        {
+                            fm.submit.disabled = false;
+                        }
+                        else
+                        {
+                            fm.submit.disabled = true;
+                        }
+                    }
+                }
+
+            ]]></xsl:text>
+            </script>
+
+        </head>
+    <body class="yui-skin-sam" onload="nof5();">
+            <xsl:apply-templates/>
+        </body>
+        </html>
+    </xsl:template>
+
+    <xsl:template match="PermissionAddResponse">
+        <form id="permissionform" method="POST" action="/ws_access/PermissionAction">
+        <input type="hidden" name="basedn" value="{basedn}"/>
+        <input type="hidden" name="rname" value="{rname}"/>
+        <input type="hidden" name="rtype" value="{rtype}"/>
+        <input type="hidden" name="rtitle" value="{rtitle}"/>
+        <input type="hidden" name="prefix" value="{prefix}"/>
+        <input type="hidden" name="BasednName" value="{BasednName}"/>
+        <input type="hidden" name="account_name" value="{AccountName}"/>
+        <input type="hidden" name="account_type" value="{AccountType}"/>
+        <table style="text-align:left;" cellspacing="10" name="table1">
+            <tr>
+                <th colspan="2">
+                    <xsl:choose>
+                    <xsl:when test="string-length(AccountName)">
+                        <h3>Add Permission for <xsl:value-of select="AccountName"/></h3>
+                    </xsl:when>
+                    <xsl:otherwise>
+                        <h3>Add Permission for <xsl:value-of select="rname"/></h3>
+                    </xsl:otherwise>
+                    </xsl:choose>
+                </th>
+            </tr>
+            <tr>
+                <td height="10"></td>
+            </tr>
+            <xsl:choose>
+                    <xsl:when test="string-length(AccountName)">
+                    <tr>
+                    <th>Permission:</th>
+                    <td><xsl:value-of select="BasednName"/></td>
+                    </tr>
+                    <tr>
+                        <th>Select Resource:</th>
+                            <td>
+                            <select size="1" name="ResourceName" onChange="validateInput()">
+                                <xsl:apply-templates select="Resources"/>
+                            </select>
+                        </td>
+                    </tr>
+                </xsl:when>
+                                <xsl:otherwise>
+            <tr>
+            <xsl:choose>
+            <xsl:when test="toomany=1">
+                <th>User:</th>
+                <td>
+                <input size="20" name="user"/>
+                </td>
+            </xsl:when>
+            <xsl:otherwise>
+
+                <th>Select user:</th>
+                <td>
+                <select size="1" name="user" onChange="validateInput()">
+                    <option value="">none</option>
+                    <xsl:apply-templates select="Users"/>
+                </select>
+                </td>
+            </xsl:otherwise>
+            </xsl:choose>
+            </tr>
+            <tr>
+                <th>Or group:</th>
+                <td>
+                <select size="1" name="group" onChange="validateInput()">
+                    <option value="">none</option>
+                    <xsl:apply-templates select="Groups"/>
+                </select>
+                </td>
+            </tr>
+                </xsl:otherwise>
+                        </xsl:choose>
+
+            <tr>
+                <th>allow:</th>
+                <td>
+                    <table>
+                        <tr>
+                        </tr>
+                        <tr>
+                            <td width="50">access</td>
+                            <td width="50">read</td>
+                            <td width="50">write</td>
+                            <td width="50">full</td>
+                        </tr>
+                        <tr>
+                            <td width="50"><input type="checkbox" name="allow_access" value="1" onClick="permChange(this.form,this);validateInput()"/></td>
+                            <td width="50"><input type="checkbox" name="allow_read" value="1" onClick="permChange(this.form,this);validateInput()"/></td>
+                            <td width="50"><input type="checkbox" name="allow_write" value="1" onClick="permChange(this.form,this);validateInput()"/></td>
+                            <td width="50"><input type="checkbox" name="allow_full" value="1" onClick="permChange(this.form,this);validateInput()"/></td>
+                        </tr>
+                    </table>
+                </td>
+            </tr>
+
+            <tr>
+                <th>deny:</th>
+                <td>
+                    <table>
+                        <tr>
+                        </tr>
+                        <tr>
+                            <td width="50">access</td>
+                            <td width="50">read</td>
+                            <td width="50">write</td>
+                            <td width="50">full</td>
+                        </tr>
+                        <tr>
+                            <td width="50"><input type="checkbox" name="deny_access" value="1" onClick="permChange(this.form,this);validateInput()"/></td>
+                            <td width="50"><input type="checkbox" name="deny_read" value="1" onClick="permChange(this.form,this);validateInput()"/></td>
+                            <td width="50"><input type="checkbox" name="deny_write" value="1" onClick="permChange(this.form,this);validateInput()"/></td>
+                            <td width="50"><input type="checkbox" name="deny_full" value="1" onClick="permChange(this.form,this);validateInput()"/></td>
+                        </tr>
+                    </table>
+                </td>
+            </tr>
+
+            <tr>
+                <td></td>
+                <td><input type="hidden" value="add" name="action"/><input type="submit" class="sbutton" value="  Add  " name="submit" disabled="true"/></td>
+            </tr>
+            </table>
+        </form>
+    </xsl:template>
+
+    <xsl:template match="Users">
+        <xsl:apply-templates select="User">
+            <xsl:sort select="username"/>
+        </xsl:apply-templates>
+    </xsl:template>
+
+    <xsl:template match="User">
+        <option value="{username}"><xsl:value-of select="username"/></option>
+    </xsl:template>
+
+    <xsl:template match="Groups">
+        <xsl:apply-templates select="Group">
+            <xsl:sort select="name"/>
+        </xsl:apply-templates>
+    </xsl:template>
+
+    <xsl:template match="Group">
+        <option value="{name}"><xsl:value-of select="name"/></option>
+    </xsl:template>
+
+    <xsl:template match="Resources">
+                <xsl:apply-templates select="Item"/>
+    </xsl:template>
+
+        <xsl:template match="Item">
+                <option value="{.}"><xsl:value-of select="."/></option>
+        </xsl:template>
+
+</xsl:stylesheet>

+ 77 - 0
esp/eclwatch/ws_XSLT/access_permissionchange.xslt

@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Copyright (C) <2010>  <LexisNexis Risk Data Management Inc.>
+
+    All rights reserved. This program is NOT PRESENTLY free software: you can NOT redistribute it and/or modify
+    it under the terms of the GNU Affero General Public License as
+    published by the Free Software Foundation, either version 3 of the
+    License, or (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU Affero General Public License for more details.
+
+    You should have received a copy of the GNU Affero General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+-->
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
+<xsl:output method="html"/>
+    <xsl:output method="html"/>
+    <xsl:template match="/">
+        <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+        <head>
+            <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+            <title>Permissions</title>
+      <link rel="stylesheet" type="text/css" href="/esp/files/yui/build/fonts/fonts-min.css" />
+      <link rel="stylesheet" type="text/css" href="/esp/files/css/espdefault.css" />
+      <link rel="stylesheet" type="text/css" href="/esp/files/css/eclwatch.css" />
+      <script type="text/javascript" src="/esp/files/scripts/espdefault.js">&#160;</script>
+    </head>
+    <body class="yui-skin-sam" onload="nof5();">
+            <xsl:apply-templates/>
+        </body>
+        </html>
+    </xsl:template>
+    <xsl:template match="PermissionActionResponse">
+<table>
+<tbody>
+<th align="left">
+<h2>Permission Change Result</h2>
+</th>
+<tr>
+<td>
+        <xsl:choose>
+            <xsl:when test="retcode=0">
+            Permission successfully changed.
+            </xsl:when>
+            <xsl:otherwise>
+            Permission change unsuccessful,
+            </xsl:otherwise>
+        </xsl:choose>
+        <xsl:value-of select="retmsg"/>
+</td>
+</tr>
+<tr>
+<td>
+<br/>
+<br/>
+<xsl:choose>
+<xsl:when test="string-length(AccountName)">
+<a href="javascript:go('/ws_access/AccountPermissions?IsGroup={IsGroup}&amp;IncludeGroup=true&amp;AccountName={AccountName}')">Permissions for <xsl:value-of select="AccountName"/></a>
+</xsl:when>
+<xsl:otherwise>
+<a href="javascript:go('/ws_access/ResourcePermissions?basedn={basedn}&amp;rtype={rtype}&amp;rtitle={rtitle}&amp;name={rname}&amp;prefix={prefix}')">Permissions for <xsl:value-of select="rname"/></a>
+<br/>
+<a href="javascript:go('/ws_access/Resources?basedn={basedn}&amp;rtype={rtype}&amp;rtitle={rtitle}&amp;prefix={prefix}')"><xsl:value-of select="rtitle"/> Permissions</a>
+</xsl:otherwise>
+</xsl:choose>
+</td>
+</tr>
+</tbody>
+</table>
+
+    </xsl:template>
+</xsl:stylesheet>

+ 504 - 0
esp/eclwatch/ws_XSLT/access_permissionresetinput.xslt

@@ -0,0 +1,504 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Copyright (C) <2010>  <LexisNexis Risk Data Management Inc.>
+
+    All rights reserved. This program is NOT PRESENTLY free software: you can NOT redistribute it and/or modify
+    it under the terms of the GNU Affero General Public License as
+    published by the Free Software Foundation, either version 3 of the
+    License, or (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU Affero General Public License for more details.
+
+    You should have received a copy of the GNU Affero General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+-->
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
+<xsl:output method="html"/>
+    <xsl:output method="html"/>
+    <xsl:template match="/">
+        <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+        <head>
+            <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+            <title>Add Permission</title>
+         <link type="text/css" rel="stylesheet" href="/esp/files_/css/espdefault.css"/>
+            <link type="text/css" rel="StyleSheet" href="files_/css/sortabletable.css"/>
+      <script type="text/javascript" src="files_/scripts/espdefault.js">&#160;</script>
+            <script type="text/javascript" src="files_/scripts/sortabletable.js">
+                <xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
+            </script>
+            <script language="JavaScript1.2" src="files_/scripts/multiselect.js">
+                <xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
+            </script>
+            <script language="JavaScript1.2">
+            <xsl:text disable-output-escaping="yes"><![CDATA[
+                function onRowCheck(checked)
+                {
+                    validateInput();
+                }
+
+                function getSelected(o)
+                {
+                    if (o.tagName=='INPUT' && o.type == 'checkbox' && o.value != 'on')
+                        return o.checked ? '\n'+o.value : '';
+
+                    var s='';
+                    var ch=o.children;
+                    if (ch)
+                        for (var i in ch)
+                            s=s+getSelected(ch[i]);
+                    return s;
+                }
+
+                function getSelected1(o)
+                {
+                    var loc = -1;
+                    if (o.tagName =='INPUT' && o.type == 'checkbox')
+                    {
+                        loc = o.name.indexOf("name");
+                    }
+
+                    if (o.tagName=='INPUT' && o.type == 'checkbox' && (o.value != 'on' || loc != 0))
+                        return o.checked ? '\n'+o.name : '';
+
+                    var s='';
+                    var ch=o.children;
+                    if (ch)
+                        for (var i in ch)
+                            s=s+getSelected1(ch[i]);
+                    return s;
+                }
+
+                function permChange(f, i)
+                {
+                    if(i.name == "allow_access")
+                    {
+                        if(i.checked)
+                        {
+                            f.deny_access.checked=false;
+                            f.deny_full.checked=false;
+                        }
+                        else
+                            f.allow_full.checked = false;
+                    }
+                    else if(i.name == "allow_read")
+                    {
+                        if(i.checked)
+                        {
+                            f.deny_read.checked=false;
+                            f.deny_full.checked=false;
+                        }
+                        else
+                            f.allow_full.checked = false;
+                    }
+                    else if(i.name == "allow_write")
+                    {
+                        if(i.checked)
+                        {
+                            f.deny_write.checked=false;
+                            f.deny_full.checked=false;
+                        }
+                        else
+                            f.allow_full.checked = false;
+                    }
+                    else if(i.name == "allow_full")
+                    {
+                        if(i.checked)
+                        {
+                            f.deny_access.checked=false;
+                            f.deny_read.checked=false;
+                            f.deny_write.checked=false;
+                            f.deny_full.checked=false;
+                            f.allow_access.checked = true;
+                            f.allow_read.checked = true;
+                            f.allow_write.checked = true;
+                        }
+                    }
+                    else if(i.name == "deny_access")
+                    {
+                        if(i.checked)
+                        {
+                            f.allow_access.checked=false;
+                            f.allow_full.checked=false;
+                        }
+                        else
+                            f.deny_full.checked = false;
+                    }
+                    else if(i.name == "deny_read")
+                    {
+                        if(i.checked)
+                        {
+                            f.allow_read.checked=false;
+                            f.allow_full.checked=false;
+                        }
+                        else
+                            f.deny_full.checked = false;
+                    }
+                    else if(i.name == "deny_write")
+                    {
+                        if(i.checked)
+                        {
+                            f.allow_write.checked=false;
+                            f.allow_full.checked=false;
+                        }
+                        else
+                            f.deny_full.checked = false;
+                    }
+                    else if(i.name == "deny_full")
+                    {
+                        if(i.checked)
+                        {
+                            f.allow_access.checked=false;
+                            f.allow_read.checked=false;
+                            f.allow_write.checked=false;
+                            f.allow_full.checked=false;
+                            f.deny_access.checked = true;
+                            f.deny_read.checked = true;
+                            f.deny_write.checked = true;
+                        }
+                    }
+
+                }
+
+                function validateInput()
+                {
+                    var resources = 1;
+                    var sel = getSelected1(document.getElementById('resultsTable'));
+                    if (sel == '')
+                        resources = 0;
+                    //alert(resources);
+
+                    fm = document.forms[0];
+                    if (fm.usernames && fm.groupnames)
+                    {
+                        if((fm.usernames.value != '' || fm.groupnames.value != '') &&                               (fm.allow_read.checked || fm.allow_write.checked || fm.allow_full.checked
+                         || fm.deny_read.checked || fm.deny_write.checked || fm.deny_full.checked || fm.allow_access.checked || fm.deny_access.checked))
+                        {
+                            if (resources > 0)
+                                fm.submit.disabled = false;
+                            else
+                                fm.submit.disabled = true;
+                        }
+                        else
+                        {
+                            fm.submit.disabled = true;
+                        }
+                    }
+
+                    if (fm.ResourceName)
+                    {
+                        if((fm.ResourceName.value != '') && (fm.allow_read.checked || fm.allow_write.checked || fm.allow_full.checked
+                         || fm.deny_read.checked || fm.deny_write.checked || fm.deny_full.checked || fm.allow_access.checked || fm.deny_access.checked))
+                        {
+                            if (resources > 0)
+                                fm.submit.disabled = false;
+                            else
+                                fm.submit.disabled = true;
+                        }
+                        else
+                        {
+                            fm.submit.disabled = true;
+                        }
+                    }
+                }
+
+                function PreSubmit()
+                {
+                   confirmed = confirm('Are you sure you want to change the permission(s) for the following resource(s)?\n\n'+getSelected(document.getElementById('resultsTable')).substring(1,1000));
+                    if (!confirmed)
+                        return false;
+
+                    var selObj = document.getElementById("usernames");
+                    if (selObj.tagName =='INPUT')
+                    {
+                        document.getElementById("userarray").value = selObj.value;
+                    }
+                    else
+                    {
+                        var usernames0 = '';
+                        for (i=0; i<selObj.options.length; i++)
+                        {
+                            if (selObj.options[i].selected)
+                            {
+                                usernames0 = usernames0 + selObj.options[i].text + ',';
+                            }
+                        }
+                        document.getElementById("userarray").value = usernames0;
+                    }
+
+                    selObj = document.getElementById("groupnames");
+                    if (selObj.tagName =='INPUT')
+                    {
+                        document.getElementById("grouparray").value = selObj.value;
+                    }
+                    else
+                    {
+                        var groupnames0 = '';
+                        for (i=0; i<selObj.options.length; i++)
+                        {
+                            if (selObj.options[i].selected)
+                            {
+                                groupnames0 = groupnames0 + selObj.options[i].text + ',';
+                            }
+                        }
+                        document.getElementById("grouparray").value = groupnames0;
+                    }
+                }
+
+                function toggleElement()
+                {
+                     obj = document.getElementById('NameArea');
+                     obj1 = document.getElementById('NameAreaHdr');
+                     if (obj)
+                     {
+                        if (obj.style.visibility == 'visible')
+                        {
+                          obj.style.display = 'none';
+                          obj.style.visibility = 'hidden';
+                          if (obj1)
+                                obj1.innerText = 'Click here to view resources.';
+                        }
+                        else
+                        {
+                          obj.style.display = 'inline';
+                          obj.style.visibility = 'visible';
+                          if (obj1)
+                                obj1.innerText = 'Click here to hide this section.';
+                        }
+                     }
+                }
+
+                function onLoad()
+                {
+                    initSelection('resultsTable');
+                    var table = document.getElementById('resultsTable');
+                    if (table)
+                        sortableTable = new SortableTable(table, table, ["None", "String"]);
+
+                    selectAll(true);
+
+                    obj = document.getElementById('NameArea');
+                    if (obj)
+                    {
+                        obj.style.display = 'none';
+                        obj.style.visibility = 'hidden';
+                        obj1 = document.getElementById('NameAreaHdr');
+                        if (obj1)
+                            obj1.innerText = 'Click here to view resources.';
+                    }
+                }
+
+            ]]></xsl:text>
+            </script>
+
+        </head>
+    <body class="yui-skin-sam" onload="nof5();onLoad()">
+            <xsl:apply-templates/>
+        </body>
+        </html>
+    </xsl:template>
+
+    <xsl:template match="PermissionsResetInputResponse">
+        <form id="permissionform" method="POST" action="/ws_access/PermissionsReset">
+        <input type="hidden" name="basedn" value="{basedn}"/>
+        <input type="hidden" name="rname" value="{rname}"/>
+        <input type="hidden" name="rtype" value="{rtype}"/>
+        <input type="hidden" name="rtitle" value="{rtitle}"/>
+        <input type="hidden" name="prefix" value="{prefix}"/>
+        <input type="hidden" name="BasednName" value="{BasednName}"/>
+        <input type="hidden" name="userarray" value=""/>
+        <input type="hidden" name="grouparray" value=""/>
+
+        <h3>Permission Reset</h3>
+        <div>
+            <div>
+                <A href="javascript:void(0)" onclick="toggleElement();" class="wusectionexpand">
+                    <div id="NameAreaHdr">
+                        Click here to view resources.
+                    </div>
+                </A>
+            </div>
+            <div id="NameArea">
+                <xsl:attribute name="style">display:none</xsl:attribute>
+                <table class="sort-table" id="resultsTable">
+                    <colgroup>
+                      <col width="5"/>
+                      <col/>
+                    </colgroup>
+                    <thead>
+                      <tr class="grey">
+                         <th id="selectAll1">
+                            <xsl:if test="Resources/Resource[2]">
+                                <input type="checkbox" id="SelectAllBtn" title="Select or deselect all" onclick="selectAll(this.checked)"/>
+                            </xsl:if>
+                         </th>
+                         <th align="left">Resource</th>
+                      </tr>
+                    </thead>
+                    <tbody>
+                        <xsl:apply-templates select="Resources/Resource">
+                            <xsl:sort select="Resource"/>
+                        </xsl:apply-templates>
+                    </tbody>
+                </table>
+            </div>
+        </div>
+        <table style="text-align:left;" cellspacing="10" name="table1">
+            <tr>
+                <td height="10"></td>
+            </tr>
+
+            <tr>
+                <th>allow:</th>
+                <td>
+                    <table>
+                        <tr>
+                        </tr>
+                        <tr>
+                            <td width="50">access</td>
+                            <td width="50">read</td>
+                            <td width="50">write</td>
+                            <td width="50">full</td>
+                        </tr>
+                        <tr>
+                            <td width="50"><input type="checkbox" name="allow_access" value="1" onClick="permChange(this.form,this);validateInput()"/></td>
+                            <td width="50"><input type="checkbox" name="allow_read" value="1" onClick="permChange(this.form,this);validateInput()"/></td>
+                            <td width="50"><input type="checkbox" name="allow_write" value="1" onClick="permChange(this.form,this);validateInput()"/></td>
+                            <td width="50"><input type="checkbox" name="allow_full" value="1" onClick="permChange(this.form,this);validateInput()"/></td>
+                        </tr>
+                    </table>
+                </td>
+            </tr>
+
+            <tr>
+                <th>deny:</th>
+                <td>
+                    <table>
+                        <tr>
+                        </tr>
+                        <tr>
+                            <td width="50">access</td>
+                            <td width="50">read</td>
+                            <td width="50">write</td>
+                            <td width="50">full</td>
+                        </tr>
+                        <tr>
+                            <td width="50"><input type="checkbox" name="deny_access" value="1" onClick="permChange(this.form,this);validateInput()"/></td>
+                            <td width="50"><input type="checkbox" name="deny_read" value="1" onClick="permChange(this.form,this);validateInput()"/></td>
+                            <td width="50"><input type="checkbox" name="deny_write" value="1" onClick="permChange(this.form,this);validateInput()"/></td>
+                            <td width="50"><input type="checkbox" name="deny_full" value="1" onClick="permChange(this.form,this);validateInput()"/></td>
+                        </tr>
+                    </table>
+                </td>
+            </tr>
+
+            <tr>
+                <td height="10"></td>
+            </tr>
+
+            <tr>
+                <xsl:choose>
+                    <xsl:when test="toomany=1">
+                        <th>User:</th>
+                        <td>
+                            <input size="20" name="usernames"/>
+                        </td>
+                    </xsl:when>
+                    <xsl:when test="not(Users/User[4])">
+                        <th>Select User:</th>
+                        <td>
+                        <select size="3" id="usernames" name="usernames" multiple="multiple" onChange="validateInput()">
+                            <xsl:apply-templates select="Users"/>
+                        </select>
+                        </td>
+                    </xsl:when>
+                    <xsl:otherwise>
+                        <th>Select user:</th>
+                        <td>
+                        <select size="5" id="usernames" name="usernames" multiple="multiple" onChange="validateInput()">
+                            <xsl:apply-templates select="Users"/>
+                        </select>
+                        </td>
+                    </xsl:otherwise>
+                </xsl:choose>
+            </tr>
+
+            <tr>
+                <td height="10"></td>
+            </tr>
+
+            <tr>
+                <th>Select Group:</th>
+                <td>
+                    <xsl:choose>
+                        <xsl:when test="not(Groups/Group[4])">
+                            <select size="3" id="groupnames" name="groupnames" multiple="multiple" onChange="validateInput()">
+                                <xsl:apply-templates select="Groups"/>
+                            </select>
+                        </xsl:when>
+                        <xsl:otherwise>
+                            <select size="5" id="groupnames" name="groupnames" multiple="multiple" onChange="validateInput()">
+                                <xsl:apply-templates select="Groups"/>
+                            </select>
+                        </xsl:otherwise>
+                    </xsl:choose>
+                </td>
+            </tr>
+
+            <tr>
+                <td></td>
+                <td><input type="submit" class="sbutton" value="  Submit  " name="submit" disabled="true" onclick="return PreSubmit()"/></td>
+            </tr>
+            </table>
+        </form>
+    </xsl:template>
+
+    <xsl:template match="Users">
+        <option value="">(none)</option>
+        <xsl:apply-templates select="User">
+            <xsl:sort select="username"/>
+        </xsl:apply-templates>
+    </xsl:template>
+
+    <xsl:template match="User">
+        <option value="{username}"><xsl:value-of select="username"/></option>
+    </xsl:template>
+
+    <xsl:template match="Groups">
+        <option value="">(none)</option>
+        <xsl:apply-templates select="Group">
+            <xsl:sort select="name"/>
+        </xsl:apply-templates>
+    </xsl:template>
+
+    <xsl:template match="Group">
+        <option value="{name}"><xsl:value-of select="name"/></option>
+    </xsl:template>
+
+  <xsl:template match="Resource">
+            <tr onmouseenter="this.bgColor = '#F0F0FF'">
+        <xsl:choose>
+            <xsl:when test="position() mod 2">
+                <xsl:attribute name="bgColor">#FFFFFF</xsl:attribute>
+                <xsl:attribute name="onmouseleave">this.bgColor = '#FFFFFF'</xsl:attribute>
+            </xsl:when>
+            <xsl:otherwise>
+                <xsl:attribute name="bgColor">#F0F0F0</xsl:attribute>
+                <xsl:attribute name="onmouseleave">this.bgColor = '#F0F0F0'</xsl:attribute>
+            </xsl:otherwise>
+        </xsl:choose>
+        <td>
+        <input type="checkbox" name="names_i{position()}" value="{.}" onclick="return clicked(this)"/>
+        </td>
+        <td align="left">
+                <xsl:value-of select="."/>
+        </td>
+        </tr>
+  </xsl:template>
+
+    <xsl:template match="*|@*|text()"/>
+</xsl:stylesheet>

+ 343 - 0
esp/eclwatch/ws_XSLT/access_permissions.xslt

@@ -0,0 +1,343 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Copyright (C) <2010>  <LexisNexis Risk Data Management Inc.>
+
+    All rights reserved. This program is NOT PRESENTLY free software: you can NOT redistribute it and/or modify
+    it under the terms of the GNU Affero General Public License as
+    published by the Free Software Foundation, either version 3 of the
+    License, or (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU Affero General Public License for more details.
+
+    You should have received a copy of the GNU Affero General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+-->
+
+    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+    <xsl:output method="html"/>
+    <xsl:template match="/ResourcePermissionsResponse">
+        <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+        <head>
+            <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+            <title>Permissions</title>
+      <link rel="stylesheet" type="text/css" href="/esp/files/yui/build/fonts/fonts-min.css" />
+      <link rel="stylesheet" type="text/css" href="/esp/files/css/espdefault.css" />
+      <link rel="stylesheet" type="text/css" href="/esp/files/css/eclwatch.css" />
+      <link type="text/css" rel="StyleSheet" href="files_/css/sortabletable.css"/>
+      <script type="text/javascript" src="/esp/files/scripts/espdefault.js">&#160;</script>
+      <script type="text/javascript" src="files_/scripts/sortabletable.js">
+                <xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
+            </script>
+            <script language="JavaScript1.2" src="files_/scripts/multiselect.js">
+                <xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
+            </script>
+            <script language="JavaScript1.2">
+            <xsl:text disable-output-escaping="yes"><![CDATA[
+                function getSelected(o)
+                {
+                    if (o.tagName=='INPUT' && o.type == 'checkbox' && o.value != 'on')
+                        return o.checked ? '\n'+o.value : '';
+
+                    var s='';
+                    var ch=o.children;
+                    if (ch)
+                        for (var i in ch)
+                            s=s+getSelected(ch[i]);
+                    return s;
+                }
+
+                function onLoad()
+                {
+                    initSelection('resultsTable');
+                    var table = document.getElementById('resultsTable');
+                    if (table)
+                        sortableTable = new SortableTable(table, table, ["String", "None", "None", "None"]);
+                }
+
+                function onSubmit(o, theaction)
+                {
+                    document.forms[0].action = ""+theaction;
+                    return true;
+                }
+
+                function translate(boolval)
+                {
+                    if(boolval == 1)
+                    {
+                        return "checked";
+                    }
+                    else
+                    {
+                        return "";
+                    }
+                }
+                function permChange(f, i)
+                {
+                    if(i.name == "allow_access")
+                    {
+                        if(i.checked)
+                        {
+                            f.deny_access.checked=false;
+                            f.deny_full.checked=false;
+                        }
+                        else
+                            f.allow_full.checked = false;
+                    }
+                    else if(i.name == "allow_read")
+                    {
+                        if(i.checked)
+                        {
+                            f.deny_read.checked=false;
+                            f.deny_full.checked=false;
+                        }
+                        else
+                            f.allow_full.checked = false;
+                    }
+                    else if(i.name == "allow_write")
+                    {
+                        if(i.checked)
+                        {
+                            f.deny_write.checked=false;
+                            f.deny_full.checked=false;
+                        }
+                        else
+                            f.allow_full.checked = false;
+                    }
+                    else if(i.name == "allow_full")
+                    {
+                        if(i.checked)
+                        {
+                            f.deny_access.checked=false;
+                            f.deny_read.checked=false;
+                            f.deny_write.checked=false;
+                            f.deny_full.checked=false;
+                            f.allow_access.checked = true;
+                            f.allow_read.checked = true;
+                            f.allow_write.checked = true;
+                        }
+                    }
+                    else if(i.name == "deny_access")
+                    {
+                        if(i.checked)
+                        {
+                            f.allow_access.checked=false;
+                            f.allow_full.checked=false;
+                        }
+                        else
+                            f.deny_full.checked = false;
+                    }
+                    else if(i.name == "deny_read")
+                    {
+                        if(i.checked)
+                        {
+                            f.allow_read.checked=false;
+                            f.allow_full.checked=false;
+                        }
+                        else
+                            f.deny_full.checked = false;
+                    }
+                    else if(i.name == "deny_write")
+                    {
+                        if(i.checked)
+                        {
+                            f.allow_write.checked=false;
+                            f.allow_full.checked=false;
+                        }
+                        else
+                            f.deny_full.checked = false;
+                    }
+                    else if(i.name == "deny_full")
+                    {
+                        if(i.checked)
+                        {
+                            f.allow_access.checked=false;
+                            f.allow_read.checked=false;
+                            f.allow_write.checked=false;
+                            f.allow_full.checked=false;
+                            f.deny_access.checked = true;
+                            f.deny_read.checked = true;
+                            f.deny_write.checked = true;
+                        }
+                    }
+
+                }
+
+                var sortableTable = null;
+            ]]></xsl:text>
+            </script>
+        </head>
+    <body class="yui-skin-sam" onload="nof5();onLoad()">
+            <h3>Permissions of <xsl:value-of select="name"/></h3>
+            <p/>
+            <xsl:choose>
+                <xsl:when test="not(Permissions/Permission[1])">
+                </xsl:when>
+                <xsl:otherwise>
+                    <xsl:apply-templates/>
+                </xsl:otherwise>
+            </xsl:choose>
+        <form method="POST" action="/ws_access/PermissionAddInput">
+            <input type="hidden" name="basedn" value="{basedn}"/>
+            <input type="hidden" name="rtype" value="{rtype}"/>
+            <input type="hidden" name="rtitle" value="{rtitle}"/>
+            <input type="hidden" name="rname" value="{name}"/>
+            <input type="hidden" name="prefix" value="{prefix}"/>
+            <input type="submit" class="sbutton" name="action" value="  Add  "/>
+        </form>
+        </body>
+        </html>
+    </xsl:template>
+
+    <xsl:template match="Permissions">
+        <table class="sort-table" id="resultsTable">
+        <colgroup>
+            <col width="150"/>
+            <col width="200"/>
+            <col width="200"/>
+            <col width="150"/>
+            <col width="150"/>
+        </colgroup>
+        <thead>
+        <tr class="grey">
+        <th align="left">Account</th>
+        <th><table><tr><th/><th>allow</th><th/></tr><tr><td width="50">access</td><td width="50">read</td><td width="50">write</td><td width="50">full</td></tr></table></th>
+        <th><table><tr><th/><th>deny</th><th/></tr><tr><td width="50">access</td><td width="50">read</td><td width="50">write</td><td width="50">full</td></tr></table></th>
+        <th>Operation</th>
+        </tr>
+        </thead>
+        <tbody>
+        <xsl:apply-templates select="Permission">
+            <xsl:sort select="account_name"/>
+        </xsl:apply-templates>
+        </tbody>
+        </table>
+    </xsl:template>
+
+    <xsl:template match="Permission">
+        <tr onmouseenter="this.bgColor = '#F0F0FF'">
+        <xsl:choose>
+            <xsl:when test="position() mod 2">
+                <xsl:attribute name="bgColor">#FFFFFF</xsl:attribute>
+                <xsl:attribute name="onmouseleave">this.bgColor = '#FFFFFF'</xsl:attribute>
+            </xsl:when>
+            <xsl:otherwise>
+                <xsl:attribute name="bgColor">#F0F0F0</xsl:attribute>
+                <xsl:attribute name="onmouseleave">this.bgColor = '#F0F0F0'</xsl:attribute>
+            </xsl:otherwise>
+        </xsl:choose>
+        <form  method="post" action="/ws_access/PermissionAction">
+        <input type="hidden" name="basedn" value="{../../basedn}"/>
+        <input type="hidden" name="rtype" value="{../../rtype}"/>
+        <input type="hidden" name="rname" value="{../../name}"/>
+        <input type="hidden" name="rtitle" value="{../../rtitle}"/>
+        <input type="hidden" name="prefix" value="{../../prefix}"/>
+        <input type="hidden" name="account_name" value="{account_name}"/>
+        <input type="hidden" name="account_type" value="{account_type}"/>
+        <td align="left">
+        <xsl:value-of select="account_name"/>
+        </td>
+        <xsl:variable name="ar" select="checked"/>
+        <td>
+            <table>
+            <tr>
+                <td width="50" align="right">
+                    <xsl:choose>
+                        <xsl:when test="allow_access=1">
+                            <input type="checkbox" name="allow_access" value="1" checked="1" onClick="permChange(this.form,this)"/>
+                        </xsl:when>
+                        <xsl:otherwise>
+                            <input type="checkbox" name="allow_access" value="1"  onClick="permChange(this.form,this)"/>
+                        </xsl:otherwise>
+                    </xsl:choose>
+                </td>
+                <td width="50" align="right">
+                    <xsl:choose>
+                        <xsl:when test="allow_read=1">
+                            <input type="checkbox" name="allow_read" value="1" checked="1" onClick="permChange(this.form,this)"/>
+                        </xsl:when>
+                        <xsl:otherwise>
+                            <input type="checkbox" name="allow_read" value="1"  onClick="permChange(this.form,this)"/>
+                        </xsl:otherwise>
+                    </xsl:choose>
+                </td>
+                <td width="50" align="right">
+                    <xsl:choose>
+                        <xsl:when test="allow_write=1">
+                            <input type="checkbox" name="allow_write" value="1" checked="1" onClick="permChange(this.form,this)"/>
+                        </xsl:when>
+                        <xsl:otherwise>
+                            <input type="checkbox" name="allow_write" value="1" onClick="permChange(this.form,this)"/>
+                        </xsl:otherwise>
+                    </xsl:choose>
+                </td>
+                <td width="50" align="right">
+                    <xsl:choose>
+                        <xsl:when test="allow_full=1">
+                            <input type="checkbox" name="allow_full" value="1" checked="1" onClick="permChange(this.form,this)"/>
+                        </xsl:when>
+                        <xsl:otherwise>
+                            <input type="checkbox" name="allow_full" value="1" onClick="permChange(this.form,this)"/>
+                        </xsl:otherwise>
+                    </xsl:choose>
+                </td>
+            </tr>
+            </table>
+        </td>
+        <td>
+            <table>
+            <tr>
+                <td width="50" align="right">
+                    <xsl:choose>
+                        <xsl:when test="deny_access=1">
+                            <input type="checkbox" name="deny_access" value="1" checked="1" onClick="permChange(this.form,this)"/>
+                        </xsl:when>
+                        <xsl:otherwise>
+                            <input type="checkbox" name="deny_access" value="1" onClick="permChange(this.form,this)"/>
+                        </xsl:otherwise>
+                    </xsl:choose>
+                </td>
+                <td width="50" align="right">
+                    <xsl:choose>
+                        <xsl:when test="deny_read=1">
+                            <input type="checkbox" name="deny_read" value="1" checked="1" onClick="permChange(this.form,this)"/>
+                        </xsl:when>
+                        <xsl:otherwise>
+                            <input type="checkbox" name="deny_read" value="1" onClick="permChange(this.form,this)"/>
+                        </xsl:otherwise>
+                    </xsl:choose>
+                </td>
+                <td width="50" align="right">
+                    <xsl:choose>
+                        <xsl:when test="deny_write=1">
+                            <input type="checkbox" name="deny_write" value="1" checked="1" onClick="permChange(this.form,this)"/>
+                        </xsl:when>
+                        <xsl:otherwise>
+                            <input type="checkbox" name="deny_write" value="1" onClick="permChange(this.form,this)"/>
+                        </xsl:otherwise>
+                    </xsl:choose>
+                </td>
+                <td width="50" align="right">
+                    <xsl:choose>
+                        <xsl:when test="deny_full=1">
+                            <input type="checkbox" name="deny_full" value="1" checked="1" onClick="permChange(this.form,this)"/>
+                        </xsl:when>
+                        <xsl:otherwise>
+                            <input type="checkbox" name="deny_full" value="1" onClick="permChange(this.form,this)"/>
+                        </xsl:otherwise>
+                    </xsl:choose>
+                </td>
+            </tr>
+            </table>
+        </td>
+        <td><input type="submit" name="action" value="delete" onclick="return confirm('Are you sure you want to delete permissions for {escaped_account_name}?')"/><input type="submit" name="action" value="update" onclick="return confirm('Are you sure you want to update permissions for {escaped_account_name}?')"/></td>
+        </form>
+        </tr>
+    </xsl:template>
+
+    <xsl:template match="*|@*|text()"/>
+
+</xsl:stylesheet>

+ 65 - 0
esp/eclwatch/ws_XSLT/access_permissionsreset.xslt

@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Copyright (C) <2010>  <LexisNexis Risk Data Management Inc.>
+
+    All rights reserved. This program is NOT PRESENTLY free software: you can NOT redistribute it and/or modify
+    it under the terms of the GNU Affero General Public License as
+    published by the Free Software Foundation, either version 3 of the
+    License, or (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU Affero General Public License for more details.
+
+    You should have received a copy of the GNU Affero General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+-->
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
+<xsl:output method="html"/>
+    <xsl:output method="html"/>
+    <xsl:template match="/">
+        <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+        <head>
+      <script type="text/javascript" src="/esp/files/scripts/espdefault.js">&#160;</script>
+            <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+            <title>Permissions</title>
+        </head>
+    <body class="yui-skin-sam" onload="nof5();">
+            <xsl:apply-templates/>
+        </body>
+        </html>
+    </xsl:template>
+    <xsl:template match="PermissionsResetResponse">
+<table>
+<tbody>
+<th align="left">
+<h2>Permission(s) Change Result</h2>
+</th>
+<tr>
+<td>
+        <xsl:choose>
+            <xsl:when test="retcode=0">
+            Permission(s) successfully changed.
+            </xsl:when>
+            <xsl:otherwise>
+            Permission(s) change unsuccessful,
+            </xsl:otherwise>
+        </xsl:choose>
+        <xsl:value-of select="retmsg"/>
+</td>
+</tr>
+<tr>
+<td>
+<br/>
+<br/>
+<a href="javascript:go('/ws_access/Resources?basedn={basedn}&amp;rtype={rtype}&amp;rtitle={rtitle}&amp;prefix={prefix}')">Go back to permission list</a>
+</td>
+</tr>
+</tbody>
+</table>
+
+    </xsl:template>
+</xsl:stylesheet>

+ 56 - 0
esp/eclwatch/ws_XSLT/access_posix.xslt

@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Copyright (C) <2010>  <LexisNexis Risk Data Management Inc.>
+
+    All rights reserved. This program is NOT PRESENTLY free software: you can NOT redistribute it and/or modify
+    it under the terms of the GNU Affero General Public License as
+    published by the Free Software Foundation, either version 3 of the
+    License, or (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU Affero General Public License for more details.
+
+    You should have received a copy of the GNU Affero General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+-->
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
+<xsl:output method="html"/>
+    <xsl:output method="html"/>
+    <xsl:template match="/">
+        <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+        <head>
+            <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+            <title>Posix Account Result</title>
+      <script type="text/javascript" src="/esp/files/scripts/espdefault.js">&#160;</script>
+    </head>
+    <body class="yui-skin-sam" onload="nof5();">
+            <xsl:apply-templates/>
+        </body>
+        </html>
+    </xsl:template>
+    <xsl:template match="UserPosixResponse">
+<table>
+<tbody>
+<th align="left">
+<h2>Posix Account Edit Result for user <xsl:value-of select="username"/> </h2>
+</th>
+<tr>
+<td>
+<xsl:value-of select="retmsg"/>
+</td>
+</tr>
+<tr>
+<td>
+<br/>
+<br/>
+<a href="javascript:go('/ws_access/Users')">Users</a></td>
+</tr>
+</tbody>
+</table>
+
+    </xsl:template>
+</xsl:stylesheet>

+ 146 - 0
esp/eclwatch/ws_XSLT/access_posixinput.xslt

@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Copyright (C) <2010>  <LexisNexis Risk Data Management Inc.>
+
+    All rights reserved. This program is NOT PRESENTLY free software: you can NOT redistribute it and/or modify
+    it under the terms of the GNU Affero General Public License as
+    published by the Free Software Foundation, either version 3 of the
+    License, or (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU Affero General Public License for more details.
+
+    You should have received a copy of the GNU Affero General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+-->
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
+<xsl:output method="html"/>
+    <xsl:output method="html"/>
+    <xsl:template match="/">
+        <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+        <head>
+            <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+            <title>POSIX Account</title>
+      <script type="text/javascript" src="/esp/files/scripts/espdefault.js">&#160;</script>
+      <script language="JavaScript1.2">
+            <xsl:text disable-output-escaping="yes"><![CDATA[
+                function checkfields(f, i)
+                {
+                    if(i.checked)
+                    {
+                        f.uidnumber.disabled=false;
+                        f.gidnumber.disabled=false;
+                        f.homedirectory.disabled=false;
+                        f.loginshell.disabled=false;
+                    }
+                    else
+                    {
+                        f.uidnumber.disabled=true;
+                        f.gidnumber.disabled=true;
+                        f.homedirectory.disabled=true;
+                        f.loginshell.disabled=true;
+                    }
+                }
+            ]]></xsl:text>
+            </script>
+        </head>
+    <body class="yui-skin-sam" onload="nof5();">
+            <xsl:apply-templates/>
+        </body>
+        </html>
+    </xsl:template>
+    <xsl:template match="UserPosixInputResponse">
+        <form method="POST" action="/ws_access/UserPosix">
+        <input type="hidden" id="username" name="username" value="{username}"/>
+        <table name="table1">
+            <tr>
+                <th colspan="2">
+                    <h3>POSIX Account<xsl:value-of select="rtitle"/></h3>
+                </th>
+            </tr>
+            <tr>
+                <td height="10"/>
+            </tr>
+            <tr>
+                <td>User Name:</td>
+                <td>
+                    <input type="text" name="username0" value="{username}" size="35" disabled="disabled"/>
+                </td>
+            </tr>
+            <tr>
+                <td>Enable Posix:</td>
+                <td>
+                    <xsl:choose>
+                        <xsl:when test="posixenabled=1">
+                            <input type="checkbox" name="posixenabled" value="1" checked="1" onclick="checkfields(this.form, this)"/>
+                        </xsl:when>
+                        <xsl:otherwise>
+                            <input type="checkbox" name="posixenabled" value="1" onclick="checkfields(this.form, this)"/>
+                        </xsl:otherwise>
+                    </xsl:choose>
+                </td>
+            </tr>
+            <tr>
+                <td>UID Number:</td>
+                <td>
+                    <xsl:choose>
+                        <xsl:when test="posixenabled=1">
+                            <input type="text" name="uidnumber" value="{uidnumber}" size="35"/>
+                        </xsl:when>
+                        <xsl:otherwise>
+                            <input type="text" name="uidnumber" value="{uidnumber}" size="35" disabled="true"/>
+                        </xsl:otherwise>
+                    </xsl:choose>
+                </td>
+            </tr>
+            <tr>
+                <td>GID Number:</td>
+                <td>
+                    <xsl:choose>
+                        <xsl:when test="posixenabled=1">
+                            <input type="text" name="gidnumber" value="{gidnumber}" size="35"/>
+                        </xsl:when>
+                        <xsl:otherwise>
+                            <input type="text" name="gidnumber" value="{gidnumber}" size="35" disabled="true"/>
+                        </xsl:otherwise>
+                    </xsl:choose>
+                </td>
+            </tr>
+            <tr>
+                <td>Home Directory:</td>
+                <td>
+                    <xsl:choose>
+                        <xsl:when test="posixenabled=1">
+                            <input type="text" name="homedirectory" value="{homedirectory}" size="35"/>
+                        </xsl:when>
+                        <xsl:otherwise>
+                            <input type="text" name="homedirectory" value="{homedirectory}" size="35" disabled="true"/>
+                        </xsl:otherwise>
+                    </xsl:choose>
+                </td>
+            </tr>
+            <tr>
+                <td>Login Shell:</td>
+                <td>
+                    <xsl:choose>
+                        <xsl:when test="posixenabled=1">
+                            <input type="text" name="loginshell" value="{loginshell}" size="35"/>
+                        </xsl:when>
+                        <xsl:otherwise>
+                            <input type="text" name="loginshell" value="{loginshell}" size="35" disabled="true"/>
+                        </xsl:otherwise>
+                    </xsl:choose>
+                </td>
+            </tr>
+            <tr>
+                <td/>
+                <td><input type="submit" value="Submit" name="S1"/></td>
+            </tr>
+        </table>
+        </form>
+    </xsl:template>
+</xsl:stylesheet>

+ 66 - 0
esp/eclwatch/ws_XSLT/access_resetpass.xslt

@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Copyright (C) <2010>  <LexisNexis Risk Data Management Inc.>
+
+    All rights reserved. This program is NOT PRESENTLY free software: you can NOT redistribute it and/or modify
+    it under the terms of the GNU Affero General Public License as
+    published by the Free Software Foundation, either version 3 of the
+    License, or (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU Affero General Public License for more details.
+
+    You should have received a copy of the GNU Affero General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+-->
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
+<xsl:output method="html"/>
+    <xsl:output method="html"/>
+    <xsl:template match="/">
+        <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+        <head>
+            <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+            <title>Reset Password Result</title>
+      <link rel="stylesheet" type="text/css" href="/esp/files/yui/build/fonts/fonts-min.css" />
+      <link rel="stylesheet" type="text/css" href="/esp/files/css/espdefault.css" />
+      <link rel="stylesheet" type="text/css" href="/esp/files/css/eclwatch.css" />
+      <script type="text/javascript" src="/esp/files/scripts/espdefault.js">&#160;</script>
+    </head>
+    <body class="yui-skin-sam" onload="nof5();">
+            <xsl:apply-templates/>
+        </body>
+        </html>
+    </xsl:template>
+    <xsl:template match="UserResetPassResponse">
+<table>
+<tbody>
+<th align="left">
+<h2>Reset Password Result</h2>
+</th>
+<tr>
+<td>
+        <xsl:choose>
+            <xsl:when test="retcode=0">
+                Password reset succeeded.
+            </xsl:when>
+            <xsl:otherwise>
+                Password reset failed,
+                <xsl:value-of select="retmsg"/>
+            </xsl:otherwise>
+        </xsl:choose>
+</td>
+</tr>
+<tr>
+<td>
+<br/>
+<a href="javascript:go('/ws_access/Users')">Users</a></td>
+</tr>
+</tbody>
+</table>
+
+    </xsl:template>
+</xsl:stylesheet>

+ 56 - 0
esp/eclwatch/ws_XSLT/access_resetpassinput.xslt

@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Copyright (C) <2010>  <LexisNexis Risk Data Management Inc.>
+
+    All rights reserved. This program is NOT PRESENTLY free software: you can NOT redistribute it and/or modify
+    it under the terms of the GNU Affero General Public License as
+    published by the Free Software Foundation, either version 3 of the
+    License, or (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU Affero General Public License for more details.
+
+    You should have received a copy of the GNU Affero General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+-->
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
+<xsl:output method="html"/>
+    <xsl:output method="html"/>
+    <xsl:template match="/">
+        <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+        <head>
+            <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+            <title>Reset Password</title>
+      <script type="text/javascript" src="/esp/files/scripts/espdefault.js">&#160;</script>
+      <script type="text/javascript" language="javascript">
+            <![CDATA[
+            function handleSubmitBtn(f)
+            {
+                disable = (f.username.value  == '') || (f.newPassword.value=='') || (f.newPasswordRetype.value=='')
+                f.S1.disabled = disable;
+            }
+            ]]></script>
+        </head>
+    <body class="yui-skin-sam" onload="nof5();">
+            <p align="left" />
+            <xsl:apply-templates/>
+        </body>
+        </html>
+    </xsl:template>
+    <xsl:template match="UserResetPassInputResponse">
+        <form name="esp_form" method="POST" action="/ws_access/UserResetPass">
+            <input type="hidden" id="username" name="username" value="{username}"/>
+            <table>
+                <tr><th colspan="2"><h3>Reset Password</h3></th></tr>
+                <tr><td><b>User Name: </b></td><td><input type="text" name="username0" size="20" value="{username}" disabled="disabled"/></td></tr>
+                <tr><td><b>New password: </b></td><td><input type="password" name="newPassword" size="20" value=""  onchange="handleSubmitBtn(this.form)" onblur="handleSubmitBtn(this.form)" onkeypress="handleSubmitBtn(this.form)"/></td></tr>
+                <tr><td><b>Retype new password: </b></td><td><input type="password" name="newPasswordRetype" size="20" value=""  onchange="handleSubmitBtn(this.form)" onblur="handleSubmitBtn(this.form)" onkeypress="handleSubmitBtn(this.form)"/></td></tr>
+                <tr><td></td><td><input type="submit" value="Submit" name="S1" disabled="true"/><xsl:text> </xsl:text><input type="reset" value="Clear" onClick="S1.disabled='true'"/> </td> </tr>
+            </table>
+        </form>
+    </xsl:template>
+</xsl:stylesheet>

+ 84 - 0
esp/eclwatch/ws_XSLT/access_resourceadd.xslt

@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Copyright (C) <2010>  <LexisNexis Risk Data Management Inc.>
+
+    All rights reserved. This program is NOT PRESENTLY free software: you can NOT redistribute it and/or modify
+    it under the terms of the GNU Affero General Public License as
+    published by the Free Software Foundation, either version 3 of the
+    License, or (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU Affero General Public License for more details.
+
+    You should have received a copy of the GNU Affero General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+-->
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
+<xsl:output method="html"/>
+    <xsl:output method="html"/>
+    <xsl:template match="/">
+        <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+        <head>
+                <script language="JavaScript1.2">
+                   <xsl:text disable-output-escaping="yes"><![CDATA[
+                         function go(url)
+                         {
+                            document.location.href=url;
+                         }
+                   ]]></xsl:text>
+                </script>
+            <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+            <title>Add <xsl:value-of select="rtitle"/> Result</title>
+      <link rel="stylesheet" type="text/css" href="/esp/files/yui/build/fonts/fonts-min.css" />
+      <link rel="stylesheet" type="text/css" href="/esp/files/css/espdefault.css" />
+      <link rel="stylesheet" type="text/css" href="/esp/files/css/eclwatch.css" />
+      <script type="text/javascript" src="/esp/files/scripts/espdefault.js">&#160;</script>
+    </head>
+    <body class="yui-skin-sam" onload="nof5();">
+            <xsl:apply-templates/>
+        </body>
+        </html>
+    </xsl:template>
+    <xsl:template match="ResourceAddResponse">
+<table>
+<tbody>
+<th align="left">
+<h2>Add <xsl:value-of select="rtitle"/> Result</h2>
+</th>
+<tr>
+<td>
+        <xsl:choose>
+            <xsl:when test="retcode=0">
+                <xsl:choose>
+                    <xsl:when test="string-length(retmsg)">
+                        <xsl:value-of select="rtitle"/> successfully added:<xsl:text>  </xsl:text>
+                    </xsl:when>
+                    <xsl:otherwise>
+                        <xsl:value-of select="rtitle"/> successfully added.
+                    </xsl:otherwise>
+                </xsl:choose>
+            </xsl:when>
+            <xsl:otherwise>
+            Error adding <xsl:value-of select="rtitle"/>,
+            </xsl:otherwise>
+        </xsl:choose>
+        <xsl:value-of select="retmsg"/>
+</td>
+</tr>
+<tr>
+<td>
+<br/>
+<br/>
+<a href="javascript:go('/ws_access/Resources?basedn={basedn}&amp;rtype={rtype}&amp;rtitle={rtitle}&amp;prefix={prefix}')"><xsl:value-of select="rtitle"/>s</a>
+<br/>
+<a href="javascript:go('/ws_access/Permissions')">All resources</a></td>
+</tr>
+</tbody>
+</table>
+
+    </xsl:template>
+</xsl:stylesheet>

+ 72 - 0
esp/eclwatch/ws_XSLT/access_resourceaddinput.xslt

@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Copyright (C) <2010>  <LexisNexis Risk Data Management Inc.>
+
+    All rights reserved. This program is NOT PRESENTLY free software: you can NOT redistribute it and/or modify
+    it under the terms of the GNU Affero General Public License as
+    published by the Free Software Foundation, either version 3 of the
+    License, or (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU Affero General Public License for more details.
+
+    You should have received a copy of the GNU Affero General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+-->
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
+<xsl:output method="html"/>
+    <xsl:output method="html"/>
+    <xsl:template match="/">
+        <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+        <head>
+            <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+            <title>Add Resource</title>
+      <link rel="stylesheet" type="text/css" href="/esp/files/yui/build/fonts/fonts-min.css" />
+      <link rel="stylesheet" type="text/css" href="/esp/files/css/espdefault.css" />
+      <link rel="stylesheet" type="text/css" href="/esp/files/css/eclwatch.css" />
+      <script type="text/javascript" src="/esp/files/scripts/espdefault.js">&#160;</script>
+    </head>
+    <body class="yui-skin-sam" onload="nof5();">
+            <xsl:apply-templates/>
+        </body>
+        </html>
+    </xsl:template>
+    <xsl:template match="ResourceAddInputResponse">
+        <form method="POST" action="/ws_access/ResourceAdd">
+        <input type="hidden" name="rtype" value="{rtype}"/>
+        <input type="hidden" name="rtitle" value="{rtitle}"/>
+        <input type="hidden" name="basedn" value="{basedn}"/>
+        <input type="hidden" name="prefix" value="{prefix}"/>
+        <table name="table1">
+            <tr>
+                <th colspan="2">
+                    <h3>Add <xsl:value-of select="rtitle"/></h3>
+                </th>
+            </tr>
+            <tr>
+                <td height="10"/>
+            </tr>
+            <tr>
+                <td>Name:</td>
+                <td>
+                    <input type="text" name="name" size="35"/>
+                </td>
+            </tr>
+            <tr>
+                <td>Description:</td>
+                <td>
+                    <input type="text" name="description" size="35"/>
+                </td>
+            </tr>
+            <tr>
+                <td/>
+                <td><input type="submit" value="Submit" name="S1"/></td>
+            </tr>
+        </table>
+        </form>
+    </xsl:template>
+</xsl:stylesheet>

+ 68 - 0
esp/eclwatch/ws_XSLT/access_resourcedelete.xslt

@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Copyright (C) <2010>  <LexisNexis Risk Data Management Inc.>
+
+    All rights reserved. This program is NOT PRESENTLY free software: you can NOT redistribute it and/or modify
+    it under the terms of the GNU Affero General Public License as
+    published by the Free Software Foundation, either version 3 of the
+    License, or (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU Affero General Public License for more details.
+
+    You should have received a copy of the GNU Affero General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+-->
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
+<xsl:output method="html"/>
+    <xsl:output method="html"/>
+    <xsl:template match="/">
+        <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+        <head>
+            <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+            <title>Delete <xsl:value-of select="rtitle"/> Result</title>
+      <link rel="stylesheet" type="text/css" href="/esp/files/yui/build/fonts/fonts-min.css" />
+      <link rel="stylesheet" type="text/css" href="/esp/files/css/espdefault.css" />
+      <link rel="stylesheet" type="text/css" href="/esp/files/css/eclwatch.css" />
+      <script type="text/javascript" src="/esp/files/scripts/espdefault.js">&#160;</script>
+    </head>
+        <body class="yui-skin-sam" onload="nof5();">
+            <xsl:apply-templates/>
+        </body>
+        </html>
+    </xsl:template>
+    <xsl:template match="ResourceDeleteResponse">
+<table>
+<tbody>
+<th align="left">
+<h2>Delete <xsl:value-of select="rtitle"/> Result</h2>
+</th>
+<tr>
+<td>
+        <xsl:choose>
+            <xsl:when test="retcode=0">
+            <xsl:value-of select="rtitle"/>s have been deleted successfully.
+            </xsl:when>
+            <xsl:otherwise>
+            Failed to delete <xsl:value-of select="rtitle"/>s, <xsl:value-of select="retmsg"/>
+            </xsl:otherwise>
+        </xsl:choose>
+</td>
+</tr>
+<tr>
+<td>
+<br/>
+<br/>
+<a href="javascript:go('/ws_access/Resources?basedn={basedn}&amp;rtype={rtype}&amp;rtitle={rtitle}&amp;prefix={prefix}')"><xsl:value-of select="rtitle"/>s</a>
+<br/>
+<a href="javascript:go('/ws_access/Permissions')">All resources</a></td>
+</tr>
+</tbody>
+</table>
+
+    </xsl:template>
+</xsl:stylesheet>

+ 281 - 0
esp/eclwatch/ws_XSLT/access_resources.xslt

@@ -0,0 +1,281 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Copyright (C) <2010>  <LexisNexis Risk Data Management Inc.>
+
+    All rights reserved. This program is NOT PRESENTLY free software: you can NOT redistribute it and/or modify
+    it under the terms of the GNU Affero General Public License as
+    published by the Free Software Foundation, either version 3 of the
+    License, or (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU Affero General Public License for more details.
+
+    You should have received a copy of the GNU Affero General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+-->
+
+    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+    <xsl:output method="html"/>
+    <xsl:template match="/ResourcesResponse">
+        <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+        <head>
+            <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+            <title><xsl:value-of select="rtitle"/>s</title>
+      <link rel="stylesheet" type="text/css" href="/esp/files/yui/build/fonts/fonts-min.css" />
+      <link rel="stylesheet" type="text/css" href="/esp/files/css/espdefault.css" />
+      <link rel="stylesheet" type="text/css" href="/esp/files/css/eclwatch.css" />
+      <link type="text/css" rel="StyleSheet" href="files_/css/sortabletable.css"/>
+      <script type="text/javascript" src="/esp/files/scripts/espdefault.js">&#160;</script>
+            <script type="text/javascript" src="files_/scripts/sortabletable.js">
+                <xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
+            </script>
+            <script language="JavaScript1.2" src="files_/scripts/multiselect.js">
+                <xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
+            </script>
+            <script language="JavaScript1.2">
+            <xsl:text disable-output-escaping="yes"><![CDATA[
+                function onRowCheck(checked)
+                {
+                    document.getElementById('deleteBtn').disabled = checkedCount == 0;
+                    if (document.getElementById('updateBtn'))
+                        document.getElementById('updateBtn').disabled = checkedCount == 0;
+                    document.getElementById('addBtn').disabled = checkedCount != 0;
+                }
+
+                function getSelected(o)
+                {
+                    if (o.tagName=='INPUT' && o.type == 'checkbox' && o.value != 'on')
+                        return o.checked ? '\n'+o.value : '';
+
+                    var s='';
+                    var ch=o.children;
+                    if (ch)
+                        for (var i in ch)
+                            s=s+getSelected(ch[i]);
+                    return s;
+                }
+
+                function onLoad()
+                {
+                    initSelection('resultsTable');
+                    var table = document.getElementById('resultsTable');
+                    if (table)
+                        sortableTable = new SortableTable(table, table, ["None", "String", "String", "None"]);
+                }
+
+                function onSubmit(o, theaction)
+                {
+                    document.forms[0].action = ""+theaction;
+                    return true;
+                }
+
+                function doUpdateNow(value)
+                {
+                    document.getElementById('DoUpdate').value=value;
+                }
+
+                var sortableTable = null;
+            ]]></xsl:text>
+            </script>
+        </head>
+    <body class="yui-skin-sam" onload="onLoad()">
+            <h3><xsl:value-of select="rtitle"/>s</h3>
+      <xsl:choose>
+        <xsl:when test="toomany=1">
+          <form xmlns="" method="POST" action="/ws_access/Resources">
+            <input type="hidden" name="basedn" value="{basedn}"/>
+            <input type="hidden" name="rtype" value="{rtype}"/>
+            <input type="hidden" name="rtitle" value="{rtitle}"/>
+            <input type="hidden" name="prefix" value="{prefix}"/>
+            <table>
+              <tr>
+                <td colspan="4">
+                  <b>LDAP services cannot return the resource list because of "Too Many" resources.</b>
+                </td>
+              </tr>
+              <tr>
+                <td>
+                  <b>Please use a Search filter: </b>
+                  <input type="text" name="searchinput" size="20" value="" />
+                  <input type="submit" value="search" name="S1" />
+                </td>
+              </tr>
+              <tr/>
+              <tr/>
+              <tr>
+                <td>
+                </td>
+              </tr>
+              <tr>
+                <td>
+                  <input type="button" class="sbutton" id="addBtn" name="action" value="  Add  " onClick="document.forms['addform'].submit()"/>
+                </td>
+              </tr>
+            </table>
+          </form>
+        </xsl:when>
+        <xsl:otherwise>
+          <form id="listitems" action="/ws_access/ResourceDelete" method="post">
+                    <input type="hidden" name="basedn" value="{basedn}"/>
+                    <input type="hidden" name="rtype" value="{rtype}"/>
+                    <input type="hidden" name="rtitle" value="{rtitle}"/>
+                    <input type="hidden" name="prefix" value="{prefix}"/>
+                    <input type="hidden" id="DoUpdate" name="DoUpdate" value="0"/>
+
+                    <xsl:apply-templates/>
+
+                    <table id="btnTable" style="margin:20 0 0 0">
+                        <colgroup>
+                            <col span="2" width="100"/>
+                        </colgroup>
+                        <tr>
+                            <td>
+                                <input type="submit" class="sbutton" id="deleteBtn" name="action" value="Delete" disabled="true" onclick="return confirm('Are you sure you want to delete the following {../rtitle}(s) ?\n\n'+getSelected(document.forms['listitems']).substring(1,1000))"/>
+                            </td>
+                            <td>
+                                <input type="button" class="sbutton" id="updateBtn" name="action" value="Update" disabled="true" onclick="doUpdateNow(1); document.forms['listitems'].submit()"/>
+                            </td>
+                            <td>
+                                <input type="button" class="sbutton" id="addBtn" name="action" value="  Add  " onClick="document.forms['addform'].submit()"/>
+                            </td>
+                        </tr>
+                    </table>
+
+                </form>
+        </xsl:otherwise>
+      </xsl:choose>
+            <table id="btnTable2" style="margin:20 0 0 0">
+                <colgroup>
+                    <col span="8" width="50"/>
+                </colgroup>
+                <tr>
+                    <xsl:if test="rtype='module'">
+                        <td>
+                            <form action="/ws_access/Resources">
+                            <input type="hidden" name="basedn" value="{basedn}"/>
+                            <input type="hidden" name="rtype" value="service"/>
+                            <input type="hidden" name="rtitle" value="CodeGenerator Permission"/>
+                            <input type="hidden" name="prefix" value="codegenerator."/>
+                            <input type="submit" class="sbutton" id="sumbitCodeGen" name="action" value="Code Generator"/>
+                            </form>
+                        </td>
+                    </xsl:if>
+                    <xsl:if test="default_name/text()">
+                        <td>
+                            <form action="/ws_access/ResourcePermissions">
+                            <input type="hidden" name="basedn" value="{default_basedn}"/>
+                            <input type="hidden" name="rtype" value="{rtype}"/>
+                            <input type="hidden" name="name" value="{default_name}"/>
+                            <input class="sbutton" type="submit" id="sumbitBtn" name="action" value="Default Permissions"/>
+                            </form>
+                        </td>
+                    </xsl:if>
+                    <xsl:if test="rtype='file'">
+                        <td>
+                            <form action="/ws_access/ResourcePermissions">
+                            <input type="hidden" name="basedn" value="{basedn}"/>
+                            <input type="hidden" name="rtype" value="file"/>
+                            <input type="hidden" name="rtitle" value="FileScope"/>
+                            <input type="hidden" name="name" value="file"/>
+                            <input type="submit" class="sbutton" id="sumbitFiles" name="action" value="Physical Files"/>
+                            </form>
+                        </td>
+            <td>
+              <form action="/ws_access/FilePermission">
+                <input type="submit" class="sbutton" id="sumbitFile" name="action" value="Check File Permission"/>
+              </form>
+            </td>
+          </xsl:if>
+                </tr>
+            </table>
+      <form action="/ws_access/ResourceAddInput" id="addform">
+        <input type="hidden" name="basedn" value="{basedn}"/>
+        <input type="hidden" name="rtype" value="{rtype}"/>
+        <input type="hidden" name="rtitle" value="{rtitle}"/>
+        <input type="hidden" name="prefix" value="{prefix}"/>
+      </form>
+    </body>
+        </html>
+    </xsl:template>
+
+    <xsl:template match="Resources">
+        <table class="sort-table" id="resultsTable">
+            <colgroup>
+                <col width="5"/>
+                <col width="200"/>
+                <col width="200"/>
+                <col width="100"/>
+            </colgroup>
+            <thead>
+                <tr class="grey">
+                    <th id="selectAll1">
+                        <xsl:if test="Resource[2]">
+                            <!--xsl:attribute name="Resource">selectAll1</xsl:attribute-->
+                            <input type="checkbox" title="Select or deselect all" onclick="selectAll(this.checked)"/>
+                        </xsl:if>
+                    </th>
+                    <th align="left">Name</th>
+                    <th>Description</th>
+                    <th>Operation</th>
+                </tr>
+            </thead>
+            <tbody>
+                <xsl:apply-templates select="Resource">
+                    <xsl:sort select="name"/>
+                </xsl:apply-templates>
+            </tbody>
+        </table>
+        <xsl:if test="Resource[2]">
+            <table class="select-all">
+                <tr>
+                    <th id="selectAll2">
+                        <input type="checkbox" title="Select or deselect all" onclick="selectAll(this.checked)"/>
+                    </th>
+                    <th align="left" colspan="7">Select All / None</th>
+                </tr>
+            </table>
+        </xsl:if>
+    </xsl:template>
+
+    <xsl:template match="Resource">
+        <tr onmouseenter="this.bgColor = '#F0F0FF'">
+        <xsl:choose>
+            <xsl:when test="position() mod 2">
+                <xsl:attribute name="bgColor">#FFFFFF</xsl:attribute>
+                <xsl:attribute name="onmouseleave">this.bgColor = '#FFFFFF'</xsl:attribute>
+            </xsl:when>
+            <xsl:otherwise>
+                <xsl:attribute name="bgColor">#F0F0F0</xsl:attribute>
+                <xsl:attribute name="onmouseleave">this.bgColor = '#F0F0F0'</xsl:attribute>
+            </xsl:otherwise>
+        </xsl:choose>
+        <td>
+        <input type="checkbox" name="names_i{position()}" value="{name}" onclick="return clicked(this)"/>
+        </td>
+        <td align="left">
+        <xsl:choose>
+            <xsl:when test="isSpecial=1">
+                <b>
+                <xsl:value-of select="name"/>
+                </b>
+            </xsl:when>
+            <xsl:otherwise>
+                <xsl:value-of select="name"/>
+            </xsl:otherwise>
+        </xsl:choose>
+        </td>
+        <td align="left">
+        <xsl:value-of select="description"/>
+        </td>
+        <td align="center">
+            <a href="javascript:go('/ws_access/ResourcePermissions?basedn={../../basedn}&amp;rtype={../../rtype}&amp;rtitle={../../rtitle}&amp;name={name}&amp;prefix={../../prefix}')">Permissions</a>
+        </td>
+        </tr>
+    </xsl:template>
+
+    <xsl:template match="*|@*|text()"/>
+
+</xsl:stylesheet>

+ 60 - 0
esp/eclwatch/ws_XSLT/access_sudoers.xslt

@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Copyright (C) <2010>  <LexisNexis Risk Data Management Inc.>
+
+    All rights reserved. This program is NOT PRESENTLY free software: you can NOT redistribute it and/or modify
+    it under the terms of the GNU Affero General Public License as
+    published by the Free Software Foundation, either version 3 of the
+    License, or (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU Affero General Public License for more details.
+
+    You should have received a copy of the GNU Affero General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+-->
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
+<xsl:output method="html"/>
+    <xsl:output method="html"/>
+    <xsl:template match="/">
+        <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+        <head>
+            <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+            <title>SUDOers edit Result</title>
+      <link rel="stylesheet" type="text/css" href="/esp/files/yui/build/fonts/fonts-min.css" />
+      <link rel="stylesheet" type="text/css" href="/esp/files/css/espdefault.css" />
+      <link rel="stylesheet" type="text/css" href="/esp/files/css/eclwatch.css" />
+    </head>
+    <body class="yui-skin-sam">
+            <xsl:apply-templates/>
+        </body>
+        </html>
+    </xsl:template>
+    <xsl:template match="UserSudoersResponse">
+<table>
+<tbody>
+<th align="left">
+<h2>Edit SUDOers for user <xsl:value-of select="username"/>: </h2>
+</th>
+<tr>
+<td>
+<xsl:value-of select="retmsg"/>
+</td>
+</tr>
+<tr>
+<td>
+<br/>
+<br/>
+<a href="javascript:go('/ws_access/UserSudoersInput?username={username}')">Edit sudoers for user <xsl:value-of select="username"/></a>
+<br/>
+<a href="javascript:go('/ws_access/Users')">Users</a>
+</td>
+</tr>
+</tbody>
+</table>
+    </xsl:template>
+</xsl:stylesheet>

+ 87 - 0
esp/eclwatch/ws_XSLT/access_sudoersinput.xslt

@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Copyright (C) <2010>  <LexisNexis Risk Data Management Inc.>
+
+    All rights reserved. This program is NOT PRESENTLY free software: you can NOT redistribute it and/or modify
+    it under the terms of the GNU Affero General Public License as
+    published by the Free Software Foundation, either version 3 of the
+    License, or (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU Affero General Public License for more details.
+
+    You should have received a copy of the GNU Affero General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+-->
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
+<xsl:output method="html"/>
+    <xsl:output method="html"/>
+    <xsl:template match="/">
+        <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+        <head>
+            <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+            <title>POSIX Account</title>
+        </head>
+    <body class="yui-skin-sam">
+            <xsl:apply-templates/>
+        </body>
+        </html>
+    </xsl:template>
+    <xsl:template match="UserSudoersInputResponse">
+        <form method="POST" action="/ws_access/UserSudoers">
+        <input type="hidden" id="username" name="username" value="{username}"/>
+        <table name="table1">
+            <tr>
+                <th colspan="2">
+                    <h3>Edit Sudoers For User <xsl:value-of select="username"/></h3>
+                </th>
+            </tr>
+            <tr>
+                <td>Username:</td>
+                <td>
+                    <input type="text" name="username0" value="{username}" size="35" disabled="disabled"/>
+                </td>
+            </tr>
+            <tr>
+                <td>sudoHost:</td>
+                <td>
+                    <input type="text" name="sudoHost" value="{sudoHost}" size="35"/>
+                </td>
+            </tr>
+            <tr>
+                <td>sudoCommand:</td>
+                <td>
+                    <input type="text" name="sudoCommand" value="{sudoCommand}" size="35"/>
+                </td>
+            </tr>
+            <tr>
+                <td>sudoOption:</td>
+                <td>
+                    <input type="text" name="sudoOption" value="{sudoOption}" size="35"/>
+                </td>
+            </tr>
+            <tr>
+                <td height="10"/>
+            </tr>
+            <tr>
+                <td/>
+                <xsl:choose>
+                    <xsl:when test="insudoers=0">
+                    <input type="hidden" name="action" value="add"/>
+                    <td><input type="submit" class="sbutton" value="  Add  " name="add"/></td>
+                    </xsl:when>
+                    <xsl:otherwise>
+                    <td><input type="submit" class="sbutton" value="Delete" name="action"/>
+                    <xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text><input type="submit" class="sbutton" value="Update" name="action"/></td>
+                    </xsl:otherwise>
+                </xsl:choose>
+            </tr>
+        </table>
+
+        </form>
+    </xsl:template>
+</xsl:stylesheet>

+ 66 - 0
esp/eclwatch/ws_XSLT/access_useraction.xslt

@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Copyright (C) <2010>  <LexisNexis Risk Data Management Inc.>
+
+    All rights reserved. This program is NOT PRESENTLY free software: you can NOT redistribute it and/or modify
+    it under the terms of the GNU Affero General Public License as
+    published by the Free Software Foundation, either version 3 of the
+    License, or (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU Affero General Public License for more details.
+
+    You should have received a copy of the GNU Affero General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+-->
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
+<xsl:output method="html"/>
+    <xsl:output method="html"/>
+    <xsl:template match="/">
+        <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+        <head>
+            <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+            <title>Delete User Result</title>
+            <link rel="stylesheet" type="text/css" href="/esp/files/yui/build/fonts/fonts-min.css" />
+            <link rel="stylesheet" type="text/css" href="/esp/files/css/espdefault.css" />
+            <link rel="stylesheet" type="text/css" href="/esp/files/css/eclwatch.css" />
+            <script type="text/javascript" src="/esp/files/scripts/espdefault.js">&#160;</script>
+        </head>
+    <body class="yui-skin-sam">
+            <xsl:apply-templates/>
+        </body>
+        </html>
+    </xsl:template>
+    <xsl:template match="UserActionResponse">
+<table>
+<tbody>
+<th align="left">
+<h2>Delete User Result</h2>
+</th>
+<tr>
+<td>
+        <xsl:choose>
+            <xsl:when test="retcode=0">
+            Users have been deleted successfully.
+            </xsl:when>
+            <xsl:otherwise>
+            Failed to delete users, <xsl:value-of select="retmsg"/>
+            </xsl:otherwise>
+        </xsl:choose>
+</td>
+</tr>
+<tr>
+<td>
+<br/>
+<br/>
+<a href="javascript:go('/ws_access/Users')">Users</a></td>
+</tr>
+</tbody>
+</table>
+
+    </xsl:template>
+</xsl:stylesheet>

+ 167 - 0
esp/eclwatch/ws_XSLT/access_useredit.xslt

@@ -0,0 +1,167 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Copyright (C) <2010>  <LexisNexis Risk Data Management Inc.>
+
+    All rights reserved. This program is NOT PRESENTLY free software: you can NOT redistribute it and/or modify
+    it under the terms of the GNU Affero General Public License as
+    published by the Free Software Foundation, either version 3 of the
+    License, or (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU Affero General Public License for more details.
+
+    You should have received a copy of the GNU Affero General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+-->
+
+    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+    <xsl:output method="html"/>
+    <xsl:template match="/UserEditResponse">
+        <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+        <head>
+            <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+            <title>Editing User</title>
+      <link rel="stylesheet" type="text/css" href="/esp/files/yui/build/fonts/fonts-min.css" />
+      <link rel="stylesheet" type="text/css" href="/esp/files/css/espdefault.css" />
+      <link rel="stylesheet" type="text/css" href="/esp/files/css/eclwatch.css" />
+      <link type="text/css" rel="StyleSheet" href="files_/css/sortabletable.css"/>
+            <script type="text/javascript" src="files_/scripts/sortabletable.js">
+                <xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
+            </script>
+            <script language="JavaScript1.2" src="files_/scripts/multiselect.js">
+                <xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
+            </script>
+            <script language="JavaScript1.2">
+            <xsl:text disable-output-escaping="yes"><![CDATA[
+                function onRowCheck(checked)
+                {
+                    document.getElementById("deleteBtn").disabled = checkedCount == 0;
+                    document.getElementById("addBtn").disabled = checkedCount != 0;
+                }
+
+                function getSelected(o)
+                {
+                    if (o.tagName=='INPUT' && o.type == 'checkbox' && o.value != 'on')
+                        return o.checked ? '\n'+o.value : '';
+
+                    var s='';
+                    var ch=o.children;
+                    if (ch)
+                        for (var i in ch)
+                            s=s+getSelected(ch[i]);
+                    return s;
+                }
+
+                function onLoad()
+                {
+                    initSelection('resultsTable');
+                    var table = document.getElementById('resultsTable');
+                    if (table)
+                        sortableTable = new SortableTable(table, table, ["None", "String"]);
+                }
+
+                function onSubmit(o, theaction)
+                {
+                    document.forms[0].action = ""+theaction;
+                    return true;
+                }
+                var sortableTable = null;
+            ]]></xsl:text>
+            </script>
+        </head>
+    <body class="yui-skin-sam" onload="onLoad()">
+            <h3>User <xsl:value-of select="username"/> is a member of the following groups:</h3>
+            <p/>
+            <form id="listitems" action="/ws_access/UserGroupEdit">
+            <xsl:apply-templates select="Groups"/>
+            <input type="hidden" name="username" value="{username}"/>
+            <table id="btnTable" style="margin:20 0 0 0">
+            <colgroup>
+                <col span="8" width="100"/>
+            </colgroup>
+            <tr>
+            <td>
+                <input type="submit" class="sbutton" id="deleteBtn" name="action" value="Delete" disabled="true" onclick="return confirm('Are you sure you want to delete the following group(s) ?\n\n'+getSelected(document.forms['listitems']).substring(1,1000))"/>
+            </td>
+            <td>
+            <input type="button" class="sbutton" id="addBtn" name="action" value="  Add  " onClick="forms['add'].submit()"/>
+        </td>
+        </tr>
+        </table>
+            </form>
+            <form id="add" action="/ws_access/UserGroupEditInput">
+            <input type="hidden" name="username" value="{username}"/>
+            </form>
+        </body>
+        </html>
+    </xsl:template>
+
+    <xsl:template match="Groups">
+        <table class="sort-table" id="resultsTable">
+        <colgroup>
+            <col width="5"/>
+            <col width="150"/>
+        </colgroup>
+        <thead>
+        <tr class="grey">
+        <th id="selectAll1">
+        <xsl:if test="Group[2]">
+            <!--xsl:attribute name="name">selectAll1</xsl:attribute-->
+            <input type="checkbox" id="upperCB" title="Select or deselect all groups" onclick="selectAll(this.checked)"/>
+        </xsl:if>
+        </th>
+        <th>
+            Group Name
+        </th>
+        </tr>
+        </thead>
+        <tbody>
+        <xsl:apply-templates select="Group">
+            <xsl:sort select="name"/>
+        </xsl:apply-templates>
+        </tbody>
+        </table>
+        <xsl:if test="Group[2]">
+            <table class="select-all">
+            <tr>
+            <th id="selectAll2">
+            <input type="checkbox" title="Select or deselect all groups" onclick="selectAll(this.checked)"/>
+            </th>
+            <th align="left" colspan="7">Select All / None</th>
+            </tr>
+            </table>
+        </xsl:if>
+        <table id="btnTable" style="margin:20 0 0 0">
+        <colgroup>
+            <col span="8" width="100"/>
+        </colgroup>
+        </table>
+    </xsl:template>
+
+    <xsl:template match="Group">
+        <tr onmouseenter="this.bgColor = '#F0F0FF'">
+        <xsl:choose>
+            <xsl:when test="position() mod 2">
+                <xsl:attribute name="bgColor">#FFFFFF</xsl:attribute>
+                <xsl:attribute name="onmouseleave">this.bgColor = '#FFFFFF'</xsl:attribute>
+            </xsl:when>
+            <xsl:otherwise>
+                <xsl:attribute name="bgColor">#F0F0F0</xsl:attribute>
+                <xsl:attribute name="onmouseleave">this.bgColor = '#F0F0F0'</xsl:attribute>
+            </xsl:otherwise>
+        </xsl:choose>
+        <td>
+        <input type="checkbox" name="groupnames_i{position()}" value="{name}" onclick="return clicked(this)"/>
+        </td>
+        <td align="left">
+        <xsl:value-of select="name"/>
+        </td>
+        </tr>
+    </xsl:template>
+
+    <xsl:template match="*|@*|text()"/>
+
+</xsl:stylesheet>

+ 72 - 0
esp/eclwatch/ws_XSLT/access_usergroupedit.xslt

@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Copyright (C) <2010>  <LexisNexis Risk Data Management Inc.>
+
+    All rights reserved. This program is NOT PRESENTLY free software: you can NOT redistribute it and/or modify
+    it under the terms of the GNU Affero General Public License as
+    published by the Free Software Foundation, either version 3 of the
+    License, or (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU Affero General Public License for more details.
+
+    You should have received a copy of the GNU Affero General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+-->
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
+<xsl:output method="html"/>
+    <xsl:output method="html"/>
+    <xsl:template match="/">
+        <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+        <head>
+                <script language="JavaScript1.2">
+                   <xsl:text disable-output-escaping="yes"><![CDATA[
+                         function go(url)
+                         {
+                            document.location.href=url;
+                         }
+                   ]]></xsl:text>
+                </script>
+
+            <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+            <title>User memberOf edit Result</title>
+        </head>
+        <body class="yui-skin-sam">
+            <xsl:apply-templates/>
+        </body>
+        </html>
+    </xsl:template>
+    <xsl:template match="UserGroupEditResponse">
+<table>
+<tbody>
+<th align="left">
+<h2>User group membership edit result</h2>
+</th>
+<tr>
+<td>
+        <xsl:choose>
+            <xsl:when test="retcode=0">
+            </xsl:when>
+            <xsl:otherwise>
+            Error,
+            </xsl:otherwise>
+        </xsl:choose>
+        <xsl:value-of select="retmsg"/>
+</td>
+</tr>
+<tr>
+<td>
+<br/>
+<br/>
+<a href="javascript:go('/ws_access/Users?')">Users</a>
+</td>
+</tr>
+</tbody>
+</table>
+
+    </xsl:template>
+</xsl:stylesheet>

+ 156 - 0
esp/eclwatch/ws_XSLT/access_usergroupeditinput.xslt

@@ -0,0 +1,156 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Copyright (C) <2010>  <LexisNexis Risk Data Management Inc.>
+
+    All rights reserved. This program is NOT PRESENTLY free software: you can NOT redistribute it and/or modify
+    it under the terms of the GNU Affero General Public License as
+    published by the Free Software Foundation, either version 3 of the
+    License, or (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU Affero General Public License for more details.
+
+    You should have received a copy of the GNU Affero General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+-->
+
+    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+    <xsl:output method="html"/>
+    <xsl:template match="/UserGroupEditInputResponse">
+        <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+        <head>
+            <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+            <title>Editing User</title>
+      <link rel="stylesheet" type="text/css" href="/esp/files/yui/build/fonts/fonts-min.css" />
+      <link rel="stylesheet" type="text/css" href="/esp/files/css/espdefault.css" />
+      <link rel="stylesheet" type="text/css" href="/esp/files/css/eclwatch.css" />
+      <link type="text/css" rel="StyleSheet" href="files_/css/sortabletable.css"/>
+            <script type="text/javascript" src="files_/scripts/sortabletable.js">
+                <xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
+            </script>
+            <script language="JavaScript1.2" src="files_/scripts/multiselect.js">
+                <xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
+            </script>
+            <script language="JavaScript1.2">
+            <xsl:text disable-output-escaping="yes"><![CDATA[
+                function onRowCheck(checked)
+                {
+                    document.forms[0].addBtn.disabled = checkedCount == 0;
+                }
+
+                function getSelected(o)
+                {
+                    if (o.type == 'checkbox' && o.value != 'on')
+                        return o.checked ? '\n'+o.value : '';
+
+                    var s='';
+                    var ch=o.children;
+                    if (ch)
+                        for (var i in ch)
+                            s=s+getSelected(ch[i]);
+                    return s;
+                }
+
+                function onLoad()
+                {
+                    initSelection('resultsTable');
+                    var table = document.getElementById('resultsTable');
+                    if (table)
+                        sortableTable = new SortableTable(table, table, ["None", "String"]);
+                }
+
+                function onSubmit(o, theaction)
+                {
+                    document.forms[0].action = ""+theaction;
+                    return true;
+                }
+                var sortableTable = null;
+            ]]></xsl:text>
+            </script>
+        </head>
+        <body class="yui-skin-sam" onload="onLoad()">
+            <h3>Add User <xsl:value-of select="username"/> to the following groups:</h3>
+            <p/>
+            <form id="listitems" action="/ws_access/UserGroupEdit">
+            <input type="hidden" name="username" value="{username}"/>
+            <xsl:apply-templates/>
+            </form>
+        </body>
+        </html>
+    </xsl:template>
+
+    <xsl:template match="Groups">
+        <table class="sort-table" id="resultsTable">
+        <colgroup>
+            <col width="5"/>
+            <col width="150"/>
+        </colgroup>
+        <thead>
+        <tr class="grey">
+        <th>
+        <xsl:if test="Group[2]">
+            <xsl:attribute name="name">selectAll1</xsl:attribute>
+            <input type="checkbox" title="Select or deselect all groups" onclick="selectAll(this.checked)"/>
+        </xsl:if>
+        </th>
+        <th>
+            Group Name
+        </th>
+        </tr>
+        </thead>
+        <tbody>
+        <xsl:apply-templates select="Group">
+            <xsl:sort select="name"/>
+        </xsl:apply-templates>
+        </tbody>
+        </table>
+        <xsl:if test="Group[2]">
+            <table class="select-all">
+            <tr>
+            <th id="selectAll2">
+            <input type="checkbox" title="Select or deselect all groups" onclick="selectAll(this.checked)"/>
+            </th>
+            <th align="left" colspan="7">Select All / None</th>
+            </tr>
+            </table>
+        </xsl:if>
+        <table id="btnTable" style="margin:20 0 0 0">
+        <colgroup>
+            <col span="8" width="100"/>
+        </colgroup>
+        <tr>
+        <td>
+        <input type="hidden" name="action" value="add"/>
+        <input type="submit" class="sbutton" id="addBtn" name="submit" value="  Add  " disabled="true" onclick="return confirm('Are you sure you want to add user to the following group(s) ?\n\n'+getSelected(document.forms['listitems']).substring(1,1000))"/>
+        </td>
+        </tr>
+        </table>
+    </xsl:template>
+
+    <xsl:template match="Group">
+        <tr onmouseenter="this.bgColor = '#F0F0FF'">
+        <xsl:choose>
+            <xsl:when test="position() mod 2">
+                <xsl:attribute name="bgColor">#FFFFFF</xsl:attribute>
+                <xsl:attribute name="onmouseleave">this.bgColor = '#FFFFFF'</xsl:attribute>
+            </xsl:when>
+            <xsl:otherwise>
+                <xsl:attribute name="bgColor">#F0F0F0</xsl:attribute>
+                <xsl:attribute name="onmouseleave">this.bgColor = '#F0F0F0'</xsl:attribute>
+            </xsl:otherwise>
+        </xsl:choose>
+        <td>
+        <input type="checkbox" name="groupnames_i{position()}" value="{name}" onclick="return clicked(this)"/>
+        </td>
+        <td align="left">
+        <xsl:value-of select="name"/>
+        </td>
+        </tr>
+    </xsl:template>
+
+    <xsl:template match="*|@*|text()"/>
+
+</xsl:stylesheet>

+ 66 - 0
esp/eclwatch/ws_XSLT/access_userinfoedit.xslt

@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Copyright (C) <2010>  <LexisNexis Risk Data Management Inc.>
+
+    All rights reserved. This program is NOT PRESENTLY free software: you can NOT redistribute it and/or modify
+    it under the terms of the GNU Affero General Public License as
+    published by the Free Software Foundation, either version 3 of the
+    License, or (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU Affero General Public License for more details.
+
+    You should have received a copy of the GNU Affero General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+-->
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
+<xsl:output method="html"/>
+    <xsl:output method="html"/>
+    <xsl:template match="/">
+        <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+        <head>
+                <script language="JavaScript1.2">
+                   <xsl:text disable-output-escaping="yes"><![CDATA[
+                         function go(url)
+                         {
+                            document.location.href=url;
+                         }
+                   ]]></xsl:text>
+                </script>
+            <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+            <title>User Account Result</title>
+      <link rel="stylesheet" type="text/css" href="/esp/files/yui/build/fonts/fonts-min.css" />
+      <link rel="stylesheet" type="text/css" href="/esp/files/css/espdefault.css" />
+      <link rel="stylesheet" type="text/css" href="/esp/files/css/eclwatch.css" />
+    </head>
+      <body class="yui-skin-sam">
+        <xsl:apply-templates/>
+      </body>
+        </html>
+    </xsl:template>
+    <xsl:template match="UserInfoEditResponse">
+<table>
+<tbody>
+<th align="left">
+<h2>User Account Edit Result for user <xsl:value-of select="username"/> </h2>
+</th>
+<tr>
+<td>
+<xsl:value-of select="retmsg"/>
+</td>
+</tr>
+<tr>
+<td>
+<br/>
+<br/>
+<a href="javascript:go('/ws_access/Users')">Users</a></td>
+</tr>
+</tbody>
+</table>
+
+    </xsl:template>
+</xsl:stylesheet>

+ 72 - 0
esp/eclwatch/ws_XSLT/access_userinfoeditinput.xslt

@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Copyright (C) <2010>  <LexisNexis Risk Data Management Inc.>
+
+    All rights reserved. This program is NOT PRESENTLY free software: you can NOT redistribute it and/or modify
+    it under the terms of the GNU Affero General Public License as
+    published by the Free Software Foundation, either version 3 of the
+    License, or (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU Affero General Public License for more details.
+
+    You should have received a copy of the GNU Affero General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+-->
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
+<xsl:output method="html"/>
+    <xsl:output method="html"/>
+    <xsl:template match="/">
+        <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+        <head>
+            <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+            <title>POSIX Account</title>
+      <script type="text/javascript" src="/esp/files/scripts/espdefault.js">&#160;</script>
+    </head>
+    <body class="yui-skin-sam" onload="nof5();">
+            <xsl:apply-templates/>
+        </body>
+        </html>
+    </xsl:template>
+    <xsl:template match="UserInfoEditInputResponse">
+        <form method="POST" action="/ws_access/UserInfoEdit">
+        <input type="hidden" id="username" name="username" value="{username}"/>
+        <table name="table1">
+            <tr>
+                <th colspan="2">
+                    <h3>User Info Edit</h3>
+                </th>
+            </tr>
+            <tr>
+                <td height="10"/>
+            </tr>
+            <tr>
+                <td>User Name:</td>
+                <td>
+                    <input type="text" name="username0" value="{username}" size="35" disabled="disabled"/>
+                </td>
+            </tr>
+            <tr>
+                <td>First Name:</td>
+                <td>
+                    <input type="text" name="firstname" value="{firstname}" size="35"/>
+                </td>
+            </tr>
+            <tr>
+                <td>Last Name:</td>
+                <td>
+                    <input type="text" name="lastname" value="{lastname}" size="35"/>
+                </td>
+            </tr>
+            <tr>
+                <td/>
+                <td><input type="submit" value="Submit" name="S1"/></td>
+            </tr>
+        </table>
+        </form>
+    </xsl:template>
+</xsl:stylesheet>

+ 235 - 0
esp/eclwatch/ws_XSLT/access_users.xslt

@@ -0,0 +1,235 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Copyright (C) <2010>  <LexisNexis Risk Data Management Inc.>
+
+    All rights reserved. This program is NOT PRESENTLY free software: you can NOT redistribute it and/or modify
+    it under the terms of the GNU Affero General Public License as
+    published by the Free Software Foundation, either version 3 of the
+    License, or (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU Affero General Public License for more details.
+
+    You should have received a copy of the GNU Affero General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+-->
+
+    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+    <xsl:output method="html"/>
+    <xsl:template match="/UserResponse">
+        <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+        <head>
+            <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+            <title>Users</title>
+      <link rel="stylesheet" type="text/css" href="/esp/files/yui/build/fonts/fonts-min.css" />
+      <link rel="stylesheet" type="text/css" href="/esp/files/css/espdefault.css" />
+      <link rel="stylesheet" type="text/css" href="/esp/files/css/eclwatch.css" />
+      <link type="text/css" rel="StyleSheet" href="files_/css/sortabletable.css"/>
+      <script type="text/javascript" src="/esp/files/scripts/espdefault.js">&#160;</script>
+      <script type="text/javascript" src="files_/scripts/sortabletable.js">
+                <xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
+            </script>
+            <script language="JavaScript1.2" src="files_/scripts/multiselect.js">
+                <xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
+            </script>
+            <script language="JavaScript1.2">
+            <xsl:text disable-output-escaping="yes"><![CDATA[
+                function onRowCheck(checked)
+                {
+                    document.forms["listitems"].deleteBtn.disabled = checkedCount == 0;
+                    document.forms["listitems"].exportBtn.disabled = checkedCount == 0;
+                    document.forms["listitems"].addBtn.disabled = checkedCount != 0;
+                }
+
+                function getSelected(o)
+                {
+                    if (o.tagName=='INPUT' && o.type == 'checkbox' && o.value != 'on')
+                        return o.checked ? '\n'+o.value : '';
+
+                    var s='';
+                    var ch=o.children;
+                    if (ch)
+                        for (var i in ch)
+                            s=s+getSelected(ch[i]);
+                    return s;
+                }
+
+                function onLoad()
+                {
+                    initSelection('resultsTable');
+                    var table = document.getElementById('resultsTable');
+                    if (table)
+                        sortableTable = new SortableTable(table, table, ["None", "String", "String", "None"]);
+                }
+
+                function onSubmit(o, theaction)
+                {
+                    document.forms[0].action = ""+theaction;
+                    return true;
+                }
+
+        function onExport()
+                {
+                    document.getElementById('ActionType').value='Export';
+          document.forms['listitems'].submit();
+                    return true;
+                }
+        function onDelete()
+                {
+          ret = confirm('Are you sure you want to delete the following user(s) ?\n\n'+getSelected(document.forms['listitems']).substring(1,1000));
+          if (ret)
+          {
+                      document.getElementById('ActionType').value='Delete';
+            document.forms['listitems'].submit();
+          }
+                    return true;
+                }
+                var sortableTable = null;
+            ]]></xsl:text>
+            </script>
+        </head>
+    <body class="yui-skin-sam" onload="nof5();onLoad()">
+            <h3>Users</h3>
+            <xsl:choose>
+            <xsl:when test="toomany=1">
+                <form xmlns="" method="POST" action="/ws_access/Users">
+                <table>
+                <tr><td colspan="4"><b>LDAP services cannot return the user list because of "Too Many" users.</b></td></tr>
+                <tr><td colspan="4"><b>Please use a Search filter.</b></td></tr><tr/><tr/>
+                <tr><td><b>Search User: </b></td><td><input type="text" name="searchinput" size="20" value="" /></td></tr>
+                <tr><td></td><td><input type="submit" value="search" name="S1" /></td></tr>
+                </table>
+                </form>
+            </xsl:when>
+      <xsl:when test="not(Users/User[1])">
+        <table>
+          <tr>
+            <td colspan="4">
+              <b>No user found.</b>
+            </td>
+          </tr>
+          <tr>
+            <td/>
+          </tr>
+          <tr>
+            <td/>
+          </tr>
+          <tr>
+            <td>
+              <input type="button" class="sbutton" id="addBtn" value="  Add  " onClick="javascript:go('/esp/files_/useradd.html')"/>
+            </td>
+          </tr>
+        </table>
+      </xsl:when>
+            <xsl:otherwise>
+                <form id="listitems" action="/ws_access/UserAction" method="post">
+                <input type="hidden" id="ActionType" name="ActionType" value="Delete"/>
+                <table class="sort-table" id="resultsTable">
+                <colgroup>
+                    <col width="5"/>
+                    <col width="150"/>
+                    <col width="200"/>
+                    <col width="250"/>
+                </colgroup>
+                <thead>
+                <tr class="grey">
+                <th id="selectAll1">
+                <xsl:if test="Users/User[2]">
+                    <!--xsl:attribute name="username">selectAll1</xsl:attribute-->
+                    <input type="checkbox" title="Select or deselect all Users" onclick="selectAll(this.checked)"/>
+                </xsl:if>
+                </th>
+                <th align="left">User ID</th>
+                <th>Full Name</th>
+                <th>Operation</th>
+                </tr>
+                </thead>
+                <tbody>
+
+                <xsl:apply-templates/>
+                </tbody>
+                </table>
+                <xsl:if test="Users/User[2]">
+                    <table class="select-all">
+                    <tr>
+                    <th id="selectAll2">
+                    <input type="checkbox" title="Select or deselect all users" onclick="selectAll(this.checked)"/>
+                    </th>
+                    <th align="left" colspan="7">Select All / None</th>
+                    </tr>
+                    </table>
+                </xsl:if>
+                <table id="btnTable" style="margin:20 0 0 0">
+                <colgroup>
+                    <col span="8" width="100"/>
+                </colgroup>
+                <tr>
+          <td>
+            <input type="button" class="sbutton" id="exportBtn" name="action1" value="Export" disabled="true" onclick="return onExport();"/>
+          </td>
+          <td>
+                    <input type="button" class="sbutton" id="deleteBtn" name="action0" value="Delete" disabled="true" onclick="return onDelete()"/>
+                  </td>
+                  <td>
+                    <input type="button" class="sbutton" id="addBtn" value="  Add  " onClick="javascript:go('/esp/files_/useradd.html')"/>
+                  </td>
+        </tr>
+        </table>
+                </form>
+            </xsl:otherwise>
+            </xsl:choose>
+        </body>
+        </html>
+    </xsl:template>
+
+    <xsl:template match="Users">
+        <xsl:apply-templates select="User">
+            <xsl:sort select="username"/>
+        </xsl:apply-templates>
+    </xsl:template>
+
+    <xsl:template match="User">
+        <tr onmouseenter="this.bgColor = '#F0F0FF'">
+        <xsl:choose>
+            <xsl:when test="position() mod 2">
+                <xsl:attribute name="bgColor">#FFFFFF</xsl:attribute>
+                <xsl:attribute name="onmouseleave">this.bgColor = '#FFFFFF'</xsl:attribute>
+            </xsl:when>
+            <xsl:otherwise>
+                <xsl:attribute name="bgColor">#F0F0F0</xsl:attribute>
+                <xsl:attribute name="onmouseleave">this.bgColor = '#F0F0F0'</xsl:attribute>
+            </xsl:otherwise>
+        </xsl:choose>
+        <td>
+        <input type="checkbox" name="usernames_i{position()}" value="{username}" onclick="return clicked(this)"/>
+        </td>
+        <td align="left">
+        <xsl:value-of select="username"/>
+        </td>
+        <td>
+        <xsl:value-of select="fullname"/>
+        </td>
+        <td>
+            <a href="javascript:go('/ws_access/UserInfoEditInput?username={username}')">Edit</a>
+            <xsl:text disable-output-escaping="yes"> </xsl:text>
+            <a href="javascript:go('/ws_access/UserEdit?username={username}')">MemberOf</a>
+            <xsl:text disable-output-escaping="yes"> </xsl:text>
+            <a href="javascript:go('/ws_access/UserResetPassInput?username={username}')">Password</a>
+            <xsl:text disable-output-escaping="yes"> </xsl:text>
+            <a href="javascript:go('/ws_access/AccountPermissions?IsGroup=false&amp;IncludeGroup=true&amp;AccountName={username}')">Permissions</a>
+            <xsl:if test="../../posixok=1">
+            <xsl:text disable-output-escaping="yes"> </xsl:text>
+            <a href="javascript:go('/ws_access/UserPosixInput?username={username}')">Posix</a>
+            <xsl:text disable-output-escaping="yes"> </xsl:text>
+            <a href="javascript:go('/ws_access/UserSudoersInput?username={username}')">Sudoers</a>
+            </xsl:if>
+        </td>
+        </tr>
+    </xsl:template>
+
+    <xsl:template match="*|@*|text()"/>
+
+</xsl:stylesheet>

+ 72 - 0
esp/eclwatch/ws_XSLT/account.xslt

@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Copyright (C) <2010>  <LexisNexis Risk Data Management Inc.>
+
+    All rights reserved. This program is NOT PRESENTLY free software: you can NOT redistribute it and/or modify
+    it under the terms of the GNU Affero General Public License as
+    published by the Free Software Foundation, either version 3 of the
+    License, or (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU Affero General Public License for more details.
+
+    You should have received a copy of the GNU Affero General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+-->
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
+<xsl:output method="html"/>
+    <xsl:output method="html"/>
+    <xsl:template match="/">
+        <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+        <head>
+            <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+            <title>Change Password Result</title>
+      <link rel="stylesheet" type="text/css" href="/esp/files/yui/build/fonts/fonts-min.css" />
+      <link rel="stylesheet" type="text/css" href="/esp/files/css/espdefault.css" />
+      <link rel="stylesheet" type="text/css" href="/esp/files/css/eclwatch.css" />
+      <script type="text/javascript" src="/esp/files/scripts/espdefault.js">&#160;</script>
+    </head>
+      <body class="yui-skin-sam" onload="nof5();">
+        <xsl:apply-templates/>
+      </body>
+        </html>
+    </xsl:template>
+    <xsl:template match="UpdateUserResponse">
+<table>
+<tbody>
+<th align="left">
+<h2>Password Change Result</h2>
+</th>
+<tr>
+<td>
+        <xsl:choose>
+            <xsl:when test="retcode=0">
+            </xsl:when>
+            <xsl:otherwise>
+            Your password hasn't been changed,
+            </xsl:otherwise>
+        </xsl:choose>
+        <xsl:value-of select="message"/>
+        <br/>
+        <br/>
+        <xsl:text>Please click </xsl:text><a href="/?main">here</a><xsl:text> to relogin.</xsl:text>
+        <br/>
+</td>
+</tr>
+<tr>
+<td>
+<br/>
+<br/>
+<a href="javascript:go('/ws_lnaccount/UpdateUserInput')">Change Password</a>
+<br/>
+<a href="javascript:go('/WsSMC/Activity')">Home</a></td>
+</tr>
+</tbody>
+</table>
+
+    </xsl:template>
+</xsl:stylesheet>

+ 58 - 0
esp/eclwatch/ws_XSLT/account_input.xslt

@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Copyright (C) <2010>  <LexisNexis Risk Data Management Inc.>
+
+    All rights reserved. This program is NOT PRESENTLY free software: you can NOT redistribute it and/or modify
+    it under the terms of the GNU Affero General Public License as
+    published by the Free Software Foundation, either version 3 of the
+    License, or (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU Affero General Public License for more details.
+
+    You should have received a copy of the GNU Affero General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+-->
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
+<xsl:output method="html"/>
+    <xsl:output method="html"/>
+    <xsl:template match="/">
+        <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+        <head>
+            <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+            <title>Change Password</title>
+      <link rel="stylesheet" type="text/css" href="/esp/files/yui/build/fonts/fonts-min.css" />
+      <link rel="stylesheet" type="text/css" href="/esp/files/css/espdefault.css" />
+      <script type="text/javascript" src="/esp/files/scripts/espdefault.js">&#160;</script>
+      <script type="text/javascript" language="javascript">
+            <![CDATA[
+            function handleSubmitBtn()
+            {
+                document.getElementById("submit").disabled = (document.getElementById("oldpass").value=='') || (document.getElementById("newpass1").value=='') || (document.getElementById("newpass2").value=='');
+            }
+            ]]></script>
+        </head>
+    <body class="yui-skin-sam" onload="nof5();">
+            <p align="left" />
+            <xsl:apply-templates/>
+        </body>
+        </html>
+    </xsl:template>
+    <xsl:template match="UpdateUserInputResponse">
+        <form name="esp_form" method="POST" action="/ws_lnaccount/UpdateUser">
+            <input type="hidden" id="username" name="username" value="{username}"/>
+            <table>
+                <tr><th colspan="2"><h3>Change Password</h3></th></tr>
+                <tr><td><b>User Name: </b></td><td><input type="text" id="username2" name="username2" size="20" value="{username}" disabled="disabled"/></td></tr>
+                <tr><td><b>Old Password: </b></td><td><input id="oldpass" type="password" name="oldpass" size="20" value=""  onchange="handleSubmitBtn()" onblur="handleSubmitBtn()" onkeypress="handleSubmitBtn()"/></td></tr>
+                <tr><td><b>New password: </b></td><td><input id="newpass1" type="password" name="newpass1" size="20" value=""  onchange="handleSubmitBtn()" onblur="handleSubmitBtn()" onkeypress="handleSubmitBtn()"/></td></tr>
+                <tr><td><b>Retype new password: </b></td><td><input id="newpass2" type="password" name="newpass2" size="20" value=""  onchange="handleSubmitBtn()" onblur="handleSubmitBtn()" onkeypress="handleSubmitBtn()"/></td></tr>
+                <tr><td></td><td><input type="submit" value="Submit" id="submit" name="S1" disabled="true"/> <xsl:text disable-output-escaping="yes"> </xsl:text><input type="reset" value="Clear" onClick="S1.disabled=true"/> </td> </tr>
+            </table>
+        </form>
+    </xsl:template>
+</xsl:stylesheet>

+ 42 - 0
esp/eclwatch/ws_XSLT/account_whoami.xslt

@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Copyright (C) <2010>  <LexisNexis Risk Data Management Inc.>
+
+    All rights reserved. This program is NOT PRESENTLY free software: you can NOT redistribute it and/or modify
+    it under the terms of the GNU Affero General Public License as
+    published by the Free Software Foundation, either version 3 of the
+    License, or (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU Affero General Public License for more details.
+
+    You should have received a copy of the GNU Affero General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+-->
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
+<xsl:output method="html"/>
+    <xsl:output method="html"/>
+    <xsl:template match="/">
+        <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+        <head>
+            <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+            <title>Who Am I</title>
+      <link rel="stylesheet" type="text/css" href="/esp/files/yui/build/fonts/fonts-min.css" />
+      <link rel="stylesheet" type="text/css" href="/esp/files/css/espdefault.css" />
+      <link rel="stylesheet" type="text/css" href="/esp/files/css/eclwatch.css" />
+      <script type="text/javascript" src="/esp/files/scripts/espdefault.js">&#160;</script>
+    </head>
+      <body class="yui-skin-sam" onload="nof5();">
+        <p align="left" />
+        <xsl:apply-templates/>
+      </body>
+        </html>
+    </xsl:template>
+    <xsl:template match="WhoAmIResponse">
+        <br/><b><xsl:text>You're currently logged in as </xsl:text><xsl:value-of select="username"/></b>
+    </xsl:template>
+</xsl:stylesheet>

+ 1 - 0
esp/scm/espscm.cmake

@@ -31,6 +31,7 @@ set ( ESPSCM_SRCS
       ecldirect.ecm
       ecllib.ecm
       esp.ecm
+      ws_access.ecm
       esploggingservice.ecm
       roxiecommlibscm.ecm
       roxiemanagerscm.ecm

+ 690 - 0
esp/scm/ws_access.ecm

@@ -0,0 +1,690 @@
+/*##############################################################################
+
+    Copyright (C) 2011 HPCC Systems.
+
+    All rights reserved. This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU Affero General Public License as
+    published by the Free Software Foundation, either version 3 of the
+    License, or (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU Affero General Public License for more details.
+
+    You should have received a copy of the GNU Affero General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+############################################################################## */
+
+ESPstruct UserInfo
+{
+    string username;
+    string fullname;
+};
+
+ESPstruct GroupInfo
+{
+    string name;
+    bool deletable;
+};
+
+ESPstruct AccountPermission
+{
+    string basedn;
+        string RType;
+    string rname;
+    string rtitle;
+    string prefix;
+    string ResourceName;
+    string PermissionName;
+    bool allow_access;
+    bool allow_read;
+    bool allow_write;
+    bool allow_full;
+    bool deny_access;
+    bool deny_read;
+    bool deny_write;
+    bool deny_full;
+};
+
+ESPstruct GroupAccountPermission
+{
+    string GroupName;
+    ESParray<ESPstruct AccountPermission, Permission> Permissions;
+};
+
+ESPrequest UserRequest
+{
+    string searchinput;
+};
+
+ESPresponse UserResponse
+{
+    [min_ver("1.04")] bool NoSecMngr(false);
+    bool toomany;
+    bool posixok;
+    ESParray<ESPstruct UserInfo, User> Users;
+};
+
+ESPrequest UserEditRequest
+{
+    string username;
+};
+
+ESPresponse UserEditResponse
+{
+    string username;
+    ESParray<ESPstruct GroupInfo, Group> Groups;
+};
+
+ESPrequest UserGroupEditInputRequest
+{
+    string username;
+};
+
+ESPresponse UserGroupEditInputResponse
+{
+    string username;
+    ESParray<ESPstruct GroupInfo, Group> Groups;
+};
+
+
+ESPrequest UserGroupEditRequest
+{
+    string username;
+    string action;
+    ESParray<string> groupnames;
+};
+
+ESPresponse UserGroupEditResponse
+{
+    string username;
+    string action;
+
+    int retcode;
+    string retmsg;
+};
+
+
+ESPrequest UserPosixInputRequest
+{
+    string username;
+};
+
+ESPresponse UserPosixInputResponse
+{
+    string username;
+    bool   posixenabled;
+    string gidnumber;
+    string uidnumber;
+    string homedirectory;
+    string loginshell;
+};
+
+ESPrequest UserPosixRequest
+{
+    string username;
+    bool   posixenabled;
+    string gidnumber;
+    string uidnumber;
+    string homedirectory;
+    string loginshell;
+};
+
+ESPresponse UserPosixResponse
+{
+    string username;
+    int retcode;
+    string retmsg;
+};
+
+ESPrequest UserSudoersInputRequest
+{
+    string username;
+};
+
+ESPresponse UserSudoersInputResponse
+{
+    string username;
+    bool   insudoers;
+    string sudoHost;
+    string sudoCommand;
+    string sudoOption;
+};
+
+ESPrequest UserSudoersRequest
+{
+    string username;
+    string action;
+    string sudoHost;
+    string sudoCommand;
+    string sudoOption;
+};
+
+ESPresponse UserSudoersResponse
+{
+    string username;
+    int retcode;
+    string retmsg;
+};
+
+ESPrequest UserInfoEditInputRequest
+{
+    string username;
+};
+
+ESPresponse UserInfoEditInputResponse
+{
+    string username;
+    string firstname;
+    string lastname;
+};
+
+ESPrequest UserInfoEditRequest
+{
+    string username;
+    string firstname;
+    string lastname;
+};
+
+ESPresponse UserInfoEditResponse
+{
+    string username;
+    int  retcode;
+    string retmsg;
+};
+
+ESPrequest AddUserRequest
+{
+    [label("User Name"), cols(20)] string username;
+    [label("First Name"), cols(20)] string firstname;
+    [label("Last Name"), cols(20)] string lastname;
+    [label("Password"), password, cols(20)] password1;
+    [label("Retype password"), password, cols(20)] password2;
+};
+
+ESPresponse AddUserResponse
+{
+    int retcode;
+    string retmsg;
+};
+
+ESPrequest UserActionRequest
+{
+    string action;
+    string ActionType;
+    ESParray<string> usernames;
+};
+
+ESPresponse UserActionResponse
+{
+    string action;
+    int retcode;
+    string retmsg;
+};
+
+ESPrequest UserResetPassInputRequest
+{
+    string username;
+};
+
+ESPresponse UserResetPassInputResponse
+{
+    string username;
+};
+
+ESPrequest UserResetPassRequest
+{
+    string username;
+    string newPassword;
+    string newPasswordRetype;
+};
+
+ESPresponse UserResetPassResponse
+{
+    string username;
+    int retcode;
+    string retmsg;
+};
+
+ESPrequest GroupRequest
+{
+};
+
+ESPresponse GroupResponse
+{
+    [min_ver("1.04")] bool NoSecMngr(false);
+    ESParray<ESPstruct GroupInfo, Group> Groups;
+};
+
+ESPrequest GroupAddRequest
+{
+    string groupname;
+};
+
+ESPresponse GroupAddResponse
+{
+    string groupname;
+    int retcode;
+    string retmsg;
+};
+
+ESPrequest [nil_remove] GroupActionRequest
+{
+    ESParray<string> groupnames;
+    string ActionType;
+    bool DeletePermission;
+};
+
+ESPresponse GroupActionResponse
+{
+    string Groupnames;
+    ESParray<ESPstruct AccountPermission, Permission> Permissions;
+    int retcode;
+    string retmsg;
+};
+
+
+ESPrequest GroupEditRequest
+{
+    string groupname;
+};
+
+ESPresponse GroupEditResponse
+{
+    string groupname;
+    ESParray<ESPstruct UserInfo, User> Users;
+};
+
+ESPrequest GroupMemberEditInputRequest
+{
+    string searchinput;
+    string groupname;
+};
+
+ESPresponse GroupMemberEditInputResponse
+{
+    string groupname;
+    bool toomany;
+    ESParray<ESPstruct UserInfo, User> Users;
+};
+
+ESPrequest GroupMemberEditRequest
+{
+    string groupname;
+    string action;
+    ESParray<string> usernames;
+};
+
+ESPresponse GroupMemberEditResponse
+{
+    string groupname;
+    string action;
+
+    int retcode;
+    string retmsg;
+};
+
+ESPrequest BasednsRequest
+{
+};
+
+ESPstruct DnStruct
+{
+    string name;
+    string basedn;
+    string rtype;
+    string rtitle;
+    string templatename;
+};
+
+ESPresponse BasednsResponse
+{
+    [min_ver("1.04")] bool NoSecMngr(false);
+    ESParray<ESPstruct DnStruct, Basedn> Basedns;
+};
+
+ESPrequest ResourcesRequest
+{
+    string basedn;
+    string rtype;
+    string rtitle;
+    string templatename;
+    string prefix;
+    string searchinput;
+};
+
+ESPstruct Resource
+{
+    string name;
+    string description;
+    bool isSpecial;
+};
+
+ESPresponse ResourcesResponse
+{
+    string basedn;
+    string rtype;
+    string rtitle;
+    ESParray<ESPstruct Resource, Resource> Resources;
+
+    string default_basedn;
+    string default_name;
+    string prefix;
+    [min_ver("1.05")] bool toomany;
+};
+
+ESPrequest ResourceAddInputRequest
+{
+    string basedn;
+    string rtype;
+    string rtitle;
+    string prefix;
+};
+
+ESPresponse ResourceAddInputResponse
+{
+    string basedn;
+    string rtype;
+    string rtitle;
+    string prefix;
+};
+
+ESPrequest ResourceAddRequest
+{
+    string basedn;
+    string rtype;
+    string rtitle;
+    string name;
+    string description;
+    string prefix;
+};
+
+ESPresponse ResourceAddResponse
+{
+    string basedn;
+    string rtype;
+    string rtitle;
+    string prefix;
+
+    int retcode;
+    string retmsg;
+};
+
+ESPrequest ResourceDeleteRequest
+{
+    string basedn;
+    string rtype;
+    string rtitle;
+    string prefix;
+    ESParray<string> names;
+    int DoUpdate(0);
+};
+
+ESPresponse ResourceDeleteResponse
+{
+    string basedn;
+    string rtype;
+    string rtitle;
+    string prefix;
+
+    int retcode;
+    string retmsg;
+};
+
+ESPrequest ResourcePermissionsRequest
+{
+    string basedn;
+    string rtype;
+    string name;
+    string rtitle;
+    string prefix;
+};
+
+ESPstruct ResourcePermission
+{
+    string account_name;
+    string escaped_account_name;
+    int account_type;
+    bool allow_access;
+    bool allow_read;
+    bool allow_write;
+    bool allow_full;
+    bool deny_access;
+    bool deny_read;
+    bool deny_write;
+    bool deny_full;
+};
+
+ESPresponse ResourcePermissionsResponse
+{
+    string basedn;
+    string rtype;
+    string name;
+    string rtitle;
+    string prefix;
+    ESParray<ESPstruct ResourcePermission, Permission> Permissions;
+};
+
+ESPrequest PermissionAddRequest
+{
+    string basedn;
+    string rtype;
+    string rtitle;
+    string rname;
+    string prefix;
+    [min_ver("1.01")] string BasednName;
+    [min_ver("1.01")] string AccountName;
+    [min_ver("1.01")] int AccountType;
+};
+
+ESPresponse PermissionAddResponse
+{
+    string basedn;
+    string rtype;
+    string rtitle;
+    string rname;
+    string prefix;
+    [min_ver("1.01")] string BasednName;
+    [min_ver("1.01")] string AccountName;
+    [min_ver("1.01")] int AccountType;
+    bool toomany;
+    ESParray<ESPstruct UserInfo, User> Users;
+    ESParray<ESPstruct GroupInfo, Group> Groups;
+    [min_ver("1.01")] ESParray<string> Resources;
+};
+
+ESPrequest PermissionsResetInputRequest
+{
+    string basedn;
+    string rtype;
+    string rtitle;
+    string rname;
+    string prefix;
+    ESParray<string> names;
+};
+
+ESPresponse PermissionsResetInputResponse
+{
+    string basedn;
+    string rtype;
+    string rtitle;
+    string rname;
+    string prefix;
+    bool toomany;
+    ESParray<ESPstruct UserInfo, User> Users;
+    ESParray<ESPstruct GroupInfo, Group> Groups;
+    ESParray<string, Resource> Resources;
+    string ResourceList;
+};
+
+ESPrequest PermissionsResetRequest
+{
+    string basedn;
+    string rtype;
+    string rname;
+    string rtitle;
+    string prefix;
+    ESParray<string> names;
+
+    bool allow_access;
+    bool allow_read;
+    bool allow_write;
+    bool allow_full;
+    bool deny_access;
+    bool deny_read;
+    bool deny_write;
+    bool deny_full;
+
+    string userarray;
+    string grouparray;
+};
+
+ESPresponse PermissionsResetResponse
+{
+    string basedn;
+    string rtype;
+    string rname;
+    string rtitle;
+    string prefix;
+
+    int retcode;
+    string retmsg;
+};
+
+ESPrequest PermissionActionRequest
+{
+    string basedn;
+    string rtype;
+    string rname;
+    string rtitle;
+    string prefix;
+    string action;
+
+    string account_name;
+    int account_type;
+    bool allow_access;
+    bool allow_read;
+    bool allow_write;
+    bool allow_full;
+    bool deny_access;
+    bool deny_read;
+    bool deny_write;
+    bool deny_full;
+
+    string user;
+    string group;
+    [min_ver("1.01")] string BasednName;
+    [min_ver("1.01")] string ResourceName;
+};
+
+ESPresponse PermissionActionResponse
+{
+    string basedn;
+    string rtype;
+    string rname;
+    string rtitle;
+    string prefix;
+   [min_ver("1.01")] string AccountName;
+    [min_ver("1.01")] bool IsGroup;
+
+    int retcode;
+    string retmsg;
+};
+
+ESPrequest AccountPermissionsRequest
+{
+    string AccountName;
+    bool IsGroup;
+    bool IncludeGroup(false);
+};
+
+ESPresponse AccountPermissionsResponse
+{
+    string AccountName;
+    bool IsGroup;
+    [min_ver("1.03")] bool IncludeGroup;
+
+    ESParray<string> BasednNames;
+
+    ESParray<ESPstruct AccountPermission, Permission> Permissions;
+    //[min_ver("1.03")] ESParray<ESPstruct AccountPermission, Permission> AuthUsersPermission;
+    //[min_ver("1.03")] ESParray<ESPstruct AccountPermission, Permission> EveryonePermission;
+    [min_ver("1.03")] ESParray<ESPstruct GroupAccountPermission, GroupPermission> GroupPermissions;
+};
+
+ESPrequest [nil_remove] FilePermissionRequest
+{
+    string FileName;
+    string UserName;
+    string GroupName;
+};
+
+ESPresponse [nil_remove] FilePermissionResponse
+{
+    [min_ver("1.04")] bool NoSecMngr(false);
+    string FileName;
+    string UserName;
+    string GroupName;
+
+    bool toomany;
+    ESParray<ESPstruct UserInfo, User> Users;
+    ESParray<ESPstruct GroupInfo, Group> Groups;
+    ///ESPstruct AccountPermission Permission; //Support permission change later
+    string UserPermission;
+};
+
+ESPrequest [nil_remove] UserAccountExportRequest
+{
+    ESParray<string> usernames;
+    ESParray<string> groupnames;
+};
+
+ESPresponse [nil_remove] UserAccountExportResponse
+{
+    [http_content("application/octet-stream")] binary Result;
+};
+
+
+ESPservice [version("1.05"), default_client_version("1.05"), exceptions_inline("./smc_xslt/exceptions.xslt")] ws_access
+{
+    ESPmethod [client_xslt("/esp/xslt/access_users.xslt")] Users(UserRequest, UserResponse);
+    ESPmethod [client_xslt("/esp/xslt/access_useredit.xslt")] UserEdit(UserEditRequest, UserEditResponse);
+    ESPmethod [client_xslt("/esp/xslt/access_resetpassinput.xslt")] UserResetPassInput(UserResetPassInputRequest, UserResetPassInputResponse);
+    ESPmethod [client_xslt("/esp/xslt/access_resetpass.xslt")] UserResetPass(UserResetPassRequest, UserResetPassResponse);
+    ESPmethod [client_xslt("/esp/xslt/access_usergroupeditinput.xslt")] UserGroupEditInput(UserGroupEditInputRequest, UserGroupEditInputResponse);
+    ESPmethod [client_xslt("/esp/xslt/access_usergroupedit.xslt")] UserGroupEdit(UserGroupEditRequest, UserGroupEditResponse);
+    ESPmethod [client_xslt("/esp/xslt/access_posix.xslt")] UserPosix(UserPosixRequest, UserPosixResponse);
+    ESPmethod [client_xslt("/esp/xslt/access_posixinput.xslt")] UserPosixInput(UserPosixInputRequest, UserPosixInputResponse);
+    ESPmethod [client_xslt("/esp/xslt/access_sudoersinput.xslt")] UserSudoersInput(UserSudoersInputRequest, UserSudoersInputResponse);
+    ESPmethod [client_xslt("/esp/xslt/access_sudoers.xslt")] UserSudoers(UserSudoersRequest, UserSudoersResponse);
+    ESPmethod [client_xslt("/esp/xslt/access_userinfoeditinput.xslt")] UserInfoEditInput(UserInfoEditInputRequest, UserInfoEditInputResponse);
+    ESPmethod [client_xslt("/esp/xslt/access_userinfoedit.xslt")] UserInfoEdit(UserInfoEditRequest, UserInfoEditResponse);
+    ESPmethod [client_xslt("/esp/xslt/access_groups.xslt")] Groups(GroupRequest, GroupResponse);
+    ESPmethod [client_xslt("/esp/xslt/access_groupadd.xslt")] GroupAdd(GroupAddRequest, GroupAddResponse);
+    ESPmethod [client_xslt("/esp/xslt/access_groupdelete.xslt")] GroupAction(GroupActionRequest, GroupActionResponse);
+    ESPmethod [client_xslt("/esp/xslt/access_groupedit.xslt")] GroupEdit(GroupEditRequest, GroupEditResponse);
+    ESPmethod [client_xslt("/esp/xslt/access_groupmembereditinput.xslt")] GroupMemberEditInput(GroupMemberEditInputRequest, GroupMemberEditInputResponse);
+    ESPmethod [client_xslt("/esp/xslt/access_groupmemberedit.xslt")] GroupMemberEdit(GroupMemberEditRequest, GroupMemberEditResponse);
+    ESPmethod [client_xslt("/esp/xslt/access_adduser.xslt")] AddUser(AddUserRequest, AddUserResponse);
+    ESPmethod [client_xslt("/esp/xslt/access_useraction.xslt")] UserAction(UserActionRequest, UserActionResponse);
+    ESPmethod [client_xslt("/esp/xslt/access_basedns.xslt")] Permissions(BasednsRequest, BasednsResponse);
+    ESPmethod [client_xslt("/esp/xslt/access_resources.xslt")] Resources(ResourcesRequest, ResourcesResponse);
+    ESPmethod [client_xslt("/esp/xslt/access_resourceadd.xslt")] ResourceAdd(ResourceAddRequest, ResourceAddResponse);
+    ESPmethod [client_xslt("/esp/xslt/access_resourcedelete.xslt")] ResourceDelete(ResourceDeleteRequest, ResourceDeleteResponse);
+    ESPmethod [client_xslt("/esp/xslt/access_resourceaddinput.xslt")] ResourceAddInput(ResourceAddInputRequest, ResourceAddInputResponse);
+    ESPmethod [client_xslt("/esp/xslt/access_permissions.xslt")] ResourcePermissions(ResourcePermissionsRequest, ResourcePermissionsResponse);
+    ESPmethod [client_xslt("/esp/xslt/access_permissionaddinput.xslt")] PermissionAddInput(PermissionAddRequest, PermissionAddResponse);
+    ESPmethod [client_xslt("/esp/xslt/access_permissionchange.xslt")] PermissionAction(PermissionActionRequest, PermissionActionResponse);
+    ESPmethod [client_xslt("/esp/xslt/access_accountpermissions.xslt")] AccountPermissions(AccountPermissionsRequest, AccountPermissionsResponse);
+    ESPmethod [client_xslt("/esp/xslt/access_filepermission.xslt")] FilePermission(FilePermissionRequest, FilePermissionResponse);
+    ESPmethod [client_xslt("/esp/xslt/access_permissionresetinput.xslt")] PermissionsResetInput(PermissionsResetInputRequest, PermissionsResetInputResponse);
+    ESPmethod [client_xslt("/esp/xslt/access_permissionsreset.xslt")] PermissionsReset(PermissionsResetRequest, PermissionsResetResponse);
+    //ESPmethod [client_xslt("/esp/xslt/access_useraccountexport.xslt")] UserAccountExport(UserAccountExportRequest, UserAccountExportResponse);
+    ESPmethod UserAccountExport(UserAccountExportRequest, UserAccountExportResponse);
+
+};
+
+SCMexportdef(ws_access);
+
+SCMapi(ws_access) IClientws_access *createws_accessClient();

+ 37 - 1
esp/scm/ws_account.ecm

@@ -16,6 +16,40 @@
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ############################################################################## */
 
+#include "xslprocessor.hpp"
+
+ESPrequest UpdateUserInputRequest
+{
+};
+
+ESPresponse [exceptions_inline] UpdateUserInputResponse
+{
+    string username;
+};
+
+ESPrequest WhoAmIRequest
+{
+};
+
+ESPresponse [exceptions_inline] WhoAmIResponse
+{
+    string username;
+};
+
+ESPrequest UpdateUserRequest
+{
+    [label("User Name"), cols(20)] string username;
+    [label("Old Password"), password, cols(20)] oldpass;
+    [label("New password"), password, cols(20)] newpass1;
+    [label("Retype new password"), password, cols(20)] newpass2;
+};
+
+ESPresponse [exceptions_inline] UpdateUserResponse
+{
+    int retcode;
+    string message;
+};
+
 ESPrequest VerifyUserRequest
 {
 	string application;
@@ -29,10 +63,12 @@ ESPresponse [exceptions_inline] VerifyUserResponse
 
 ESPservice [exceptions_inline("./smc_xslt/exceptions.xslt")] ws_account
 {
+    ESPmethod [client_xslt("/esp/xslt/account_input.xslt")] UpdateUserInput(UpdateUserInputRequest, UpdateUserInputResponse);
+    ESPmethod [client_xslt("/esp/xslt/account_whoami.xslt")] WhoAmI(WhoAmIRequest, WhoAmIResponse);
+    ESPmethod [resp_xsl_default("./smc_xslt/account.xslt")] UpdateUser(UpdateUserRequest, UpdateUserResponse);
 	ESPmethod VerifyUser(VerifyUserRequest, VerifyUserResponse);
 };
 
-
 SCMexportdef(ws_account);
 
 SCMapi(ws_account) IClientws_account *createws_accountClient();

+ 14 - 13
esp/services/ws_access/CMakeLists.txt

@@ -25,27 +25,28 @@
 
 project( ws_access ) 
 
+include(${HPCC_SOURCE_DIR}/esp/scm/espscm.cmake)
 include(${HPCC_SOURCE_DIR}/esp/scm/additional.cmake)
 
 set (    SRCS 
+         ${ESPSCM_GENERATED_DIR}/ws_access_esp.cpp
          ws_accessPlugin.cpp 
          ws_accessService.cpp 
     )
 
 include_directories ( 
-         ./../.. 
-         ./../../platform 
-         ./../../../system/jlib 
-         ./../../services 
-         ./../../../system/xmllib 
-         ./../../../system/security/securesocket 
-         ./../../../system/include 
-         ./../../clients 
-         ./../../../system/security/LdapSecurity 
-         ./../../../system/security/shared 
-         ./../../bindings 
-         ./../../bindings/SOAP/xpp
-         ./../../smc/SMCLib  
+         ${HPCC_SOURCE_DIR}/esp/platform
+         ${HPCC_SOURCE_DIR}/system/jlib
+         ${HPCC_SOURCE_DIR}/esp/services
+         ${HPCC_SOURCE_DIR}/system/xmllib
+         ${HPCC_SOURCE_DIR}/system/security/securesocket
+         ${HPCC_SOURCE_DIR}/system/include
+         ${HPCC_SOURCE_DIR}/esp/clients
+         ${HPCC_SOURCE_DIR}/system/security/LdapSecurity
+         ${HPCC_SOURCE_DIR}/system/security/shared
+         ${HPCC_SOURCE_DIR}/esp/bindings
+         ${HPCC_SOURCE_DIR}/esp/bindings/SOAP/xpp
+         ${HPCC_SOURCE_DIR}/esp/smc/SMCLib
     )
 
 # NOTE - this should not be needed, it's the result of poor encapsulation and using CLdapSecManager directly 

+ 5 - 3
esp/services/ws_access/ws_accessPlugin.cpp

@@ -18,6 +18,8 @@
 
 #pragma warning (disable : 4786)
 
+#include "ws_access_esp.ipp"
+
 //ESP Bindings
 #include "http/platform/httpprot.hpp"
 
@@ -35,8 +37,8 @@ ESP_FACTORY IEspService * esp_service_factory(const char *name, const char* type
 {
    if (strcmp(type, "ws_access")==0)
    {
-      Cws_access* service = new Cws_access;
-        service->init(cfg, process, name);
+      Cws_accessEx* service = new Cws_accessEx;
+      service->init(cfg, process, name);
       return service;
    }
    return NULL;
@@ -48,7 +50,7 @@ ESP_FACTORY IEspRpcBinding * esp_binding_factory(const char *name, const char* t
 {
    if (strcmp(type, "ws_accessSoapBinding")==0)
    {
-        Cws_accessSoapBinding* binding = new Cws_accessSoapBinding(cfg, name, process);
+      Cws_accessSoapBinding* binding = new Cws_accessSoapBindingEx(cfg, name, process);
       return binding;
    }
 

File diff suppressed because it is too large
+ 3508 - 0
esp/services/ws_access/ws_accessService.cpp


+ 71 - 47
esp/services/ws_access/ws_accessService.hpp

@@ -20,53 +20,46 @@
 #define _ESPWIZ_ws_access_HPP__
 
 #pragma warning( disable : 4786)
-
-//JLib
-#include "jliball.hpp"
-
-//SCM Interfaces
-#include "esp.hpp"
-#include "soapesp.hpp"
-
-//ESP Bindings
-#include "SOAP/Platform/soapmessage.hpp"
-#include "SOAP/Platform/soapmacro.hpp"
-#include "SOAP/Platform/soapservice.hpp"
-#include "SOAP/Platform/soapparam.hpp"
-#include "SOAP/client/soapclient.hpp"
 #include "ldapsecurity.ipp"
 
-class Cws_accessSoapBinding : public CHttpSoapBinding
+#include "ws_access.hpp"
+#include "ws_access_esp.ipp"
+
+class Cws_accessSoapBindingEx : public Cws_accessSoapBinding
 {
-    StringBuffer m_authType, m_portalURL;
+    StringBuffer m_authType;
     Owned<IXslProcessor> xslp;
 
 public:
-    Cws_accessSoapBinding(IPropertyTree *cfg, const char *name, const char *process, http_soap_log_level llevel=hsl_none) : CHttpSoapBinding(cfg, name, process, llevel)
+    Cws_accessSoapBindingEx(IPropertyTree *cfg, const char *name, const char *process, http_soap_log_level llevel=hsl_none) : Cws_accessSoapBinding(cfg, name, process, llevel)
     {
         StringBuffer xpath;
         xpath.appendf("Software/EspProcess[@name='%s']/Authentication/@method", process);
         const char* method = cfg->queryProp(xpath);
         if (method && *method)
             m_authType.append(method);
-        xpath.clear().appendf("Software/EspProcess[@name='%s']/@portalurl", process);
-        const char* portalURL = cfg->queryProp(xpath.str());
-        if (portalURL && *portalURL)
-            m_portalURL.append(portalURL);
     }
 
     virtual void getNavigationData(IEspContext &context, IPropertyTree & data)
     {
-        StringBuffer path = "/WsSMC/NotInCommunityEdition?form_";
-        if (m_portalURL.length() > 0)
-            path.appendf("&EEPortal=%s", m_portalURL.str());
-
         IPropertyTree *folder = ensureNavFolder(data, "Users/Permissions", "Permissions");
-        ensureNavLink(*folder, "Users", path.str(), "Users");
-        ensureNavLink(*folder, "Groups", path.str(), "Groups");
-        ensureNavLink(*folder, "Permissions", path.str(), "Permissions");
+
+        if (!stricmp(m_authType.str(), "none") || !stricmp(m_authType.str(), "local"))
+        {
+            ensureNavLink(*folder, "Users", "/ws_access/SecurityNotEnabled?form_", "Users");
+            ensureNavLink(*folder, "Groups", "/ws_access/SecurityNotEnabled?form_", "Groups");
+            ensureNavLink(*folder, "Permissions", "/ws_access/SecurityNotEnabled?form_", "Permissions");
+        }
+        else
+        {
+            ensureNavLink(*folder, "Users", "/ws_access/Users", "Users");
+            ensureNavLink(*folder, "Groups", "/ws_access/Groups", "Groups");
+            ensureNavLink(*folder, "Permissions", "/ws_access/Permissions", "Permissions");
+        }
     }
 
+    virtual int onGetForm(IEspContext &context, CHttpRequest* request, CHttpResponse* response, const char *service, const char *method);
+
     int getQualifiedNames(IEspContext& ctx, MethodInfoArray & methods)
     {
         return methods.ordinality();
@@ -74,30 +67,61 @@ public:
     void setXslProcessor(IInterface *xslp_){xslp.set(dynamic_cast<IXslProcessor *>(xslp_));}
 };
 
-class Cws_access : public CInterface,
-    implements IEspService
+class Cws_accessEx : public Cws_access
 {
-private:
-    IEspContainer* m_container;
+    Owned<IPropertyTree> m_servicecfg;
+    IArrayOf<IEspDnStruct> m_basedns;
+    IArrayOf<IEspDnStruct> m_rawbasedns;
+    SecResourceType str2type(const char* rtstr);
+
+    void setBasedns(IEspContext &context);
+    bool permissionAddInputOnResource(IEspContext &context, IEspPermissionAddRequest &req, IEspPermissionAddResponse &resp);
+    bool permissionAddInputOnAccount(IEspContext &context, const char* accountName, IEspPermissionAddRequest &req, IEspPermissionAddResponse &resp);
+    bool getNewFileScopePermissions(ISecManager* secmgr, IEspResourceAddRequest &req, StringBuffer& existingResource, StringArray& newResources);
+    bool setNewFileScopePermissions(ISecManager* secmgr, IEspResourceAddRequest &req, StringBuffer& existingResource, StringArray& newResources);
+    bool permissionsReset(CLdapSecManager* ldapsecmgr, const char* basedn, const char* rtype, const char* prefix,
+        const char* resourceName, ACT_TYPE accountType, const char* accountName,
+        bool allow_access, bool allow_read, bool allow_write, bool allow_full,
+        bool deny_access, bool deny_read, bool deny_write, bool deny_full);
 
 public:
     IMPLEMENT_IINTERFACE;
 
-    virtual void init(IPropertyTree *cfg, const char *process, const char *service) {};
-    virtual bool init(const char * service, const char * type, IPropertyTree * cfg, const char * process)
-    {
-        return true;
-    }
-    virtual void setContainer(IEspContainer *c)
-    {
-        m_container = c;
-    }
-    virtual IEspContainer *queryContainer()
-    {
-        return m_container;
-    }
-    virtual const char* getServiceType(){return "ws_access";}
+    virtual void init(IPropertyTree *cfg, const char *process, const char *service);
+
+    virtual bool onUsers(IEspContext &context, IEspUserRequest &req, IEspUserResponse &resp);
+    virtual bool onUserEdit(IEspContext &context, IEspUserEditRequest &req, IEspUserEditResponse &resp);
+    virtual bool onGroups(IEspContext &context, IEspGroupRequest &req, IEspGroupResponse &resp);
+    virtual bool onAddUser(IEspContext &context, IEspAddUserRequest &req, IEspAddUserResponse &resp);
+    virtual bool onUserAction(IEspContext &context, IEspUserActionRequest &req, IEspUserActionResponse &resp);
+    virtual bool onPermissions(IEspContext &context, IEspBasednsRequest &req, IEspBasednsResponse &resp);
+    virtual bool onResources(IEspContext &context, IEspResourcesRequest &req, IEspResourcesResponse &resp);
+    virtual bool onResourceAdd(IEspContext &context, IEspResourceAddRequest &req, IEspResourceAddResponse &resp);
+    virtual bool onResourceAddInput(IEspContext &context, IEspResourceAddInputRequest &req, IEspResourceAddInputResponse &resp);
+    virtual bool onResourcePermissions(IEspContext &context, IEspResourcePermissionsRequest &req, IEspResourcePermissionsResponse &resp);
+    virtual bool onPermissionAddInput(IEspContext &context, IEspPermissionAddRequest &req, IEspPermissionAddResponse &resp);
+    virtual bool onPermissionAction(IEspContext &context, IEspPermissionActionRequest &req, IEspPermissionActionResponse &resp);
+    virtual bool onUserGroupEditInput(IEspContext &context, IEspUserGroupEditInputRequest &req, IEspUserGroupEditInputResponse &resp);
+    virtual bool onUserGroupEdit(IEspContext &context, IEspUserGroupEditRequest &req, IEspUserGroupEditResponse &resp);
+    virtual bool onGroupAdd(IEspContext &context, IEspGroupAddRequest &req, IEspGroupAddResponse &resp);
+    virtual bool onGroupAction(IEspContext &context, IEspGroupActionRequest &req, IEspGroupActionResponse &resp);
+    virtual bool onGroupEdit(IEspContext &context, IEspGroupEditRequest &req, IEspGroupEditResponse &resp);
+    virtual bool onGroupMemberEditInput(IEspContext &context, IEspGroupMemberEditInputRequest &req, IEspGroupMemberEditInputResponse &resp);
+    virtual bool onGroupMemberEdit(IEspContext &context, IEspGroupMemberEditRequest &req, IEspGroupMemberEditResponse &resp);
+    virtual bool onResourceDelete(IEspContext &context, IEspResourceDeleteRequest &req, IEspResourceDeleteResponse &resp);
+    virtual bool onUserResetPass(IEspContext &context, IEspUserResetPassRequest &req, IEspUserResetPassResponse &resp);
+    virtual bool onUserResetPassInput(IEspContext &context, IEspUserResetPassInputRequest &req, IEspUserResetPassInputResponse &resp);
+    virtual bool onUserPosix(IEspContext &context, IEspUserPosixRequest &req, IEspUserPosixResponse &resp);
+    virtual bool onUserPosixInput(IEspContext &context, IEspUserPosixInputRequest &req, IEspUserPosixInputResponse &resp);
+    virtual bool onUserInfoEdit(IEspContext &context, IEspUserInfoEditRequest &req, IEspUserInfoEditResponse &resp);
+    virtual bool onUserInfoEditInput(IEspContext &context, IEspUserInfoEditInputRequest &req, IEspUserInfoEditInputResponse &resp);
+    virtual bool onUserSudoersInput(IEspContext &context, IEspUserSudoersInputRequest &req, IEspUserSudoersInputResponse &resp);
+    virtual bool onUserSudoers(IEspContext &context, IEspUserSudoersRequest &req, IEspUserSudoersResponse &resp);
+    virtual bool onAccountPermissions(IEspContext &context, IEspAccountPermissionsRequest &req, IEspAccountPermissionsResponse &resp);
+    virtual bool onFilePermission(IEspContext &context, IEspFilePermissionRequest &req, IEspFilePermissionResponse &resp);
+    virtual bool onPermissionsResetInput(IEspContext &context, IEspPermissionsResetInputRequest &req, IEspPermissionsResetInputResponse &resp);
+    virtual bool onPermissionsReset(IEspContext &context, IEspPermissionsResetRequest &req, IEspPermissionsResetResponse &resp);
+    virtual bool onUserAccountExport(IEspContext &context, IEspUserAccountExportRequest &req, IEspUserAccountExportResponse &resp);
 };
 
 #endif //_ESPWIZ_ws_access_HPP__
-

+ 2 - 0
esp/services/ws_account/ws_accountPlugin.cpp

@@ -18,6 +18,8 @@
 
 #pragma warning (disable : 4786)
 
+#include "ws_account_esp.ipp"
+
 //ESP Bindings
 #include "http/platform/httpprot.hpp"
 

+ 139 - 0
esp/services/ws_account/ws_accountService.cpp

@@ -17,11 +17,150 @@
 ############################################################################## */
 
 #include "ws_accountService.hpp"
+#include "ldapsecurity.ipp"
 #include "exception_util.hpp"
 
 const int CUTOFF_MAJOR = 533;
 const int CUTOFF_MINOR = 6;
 
+const char* MSG_SEC_MANAGER_IS_NULL = "Security manager is not found. Please check if the system authentication is set up correctly";
+
+void Cws_accountEx::init(IPropertyTree *cfg, const char *process, const char *service)
+{
+}
+
+bool Cws_accountEx::onUpdateUser(IEspContext &context, IEspUpdateUserRequest & req, IEspUpdateUserResponse & resp)
+{
+    try
+    {
+        CLdapSecManager* secmgr = dynamic_cast<CLdapSecManager*>(context.querySecManager());
+        if(secmgr == NULL)
+        {
+            throw MakeStringException(ECLWATCH_INVALID_SEC_MANAGER, "Security manager can't be converted to LdapSecManager. Only LdapSecManager supports this function.");
+        }
+
+        ISecUser* user = context.queryUser();
+        if(user == NULL)
+        {
+            resp.setRetcode(-1);
+            resp.setMessage("Can't find user in esp context. Please check if the user was properly logged in.");
+            return false;
+        }
+        if(req.getUsername() == NULL || strcmp(req.getUsername(), user->getName()) != 0)
+        {
+            resp.setRetcode(-1);
+            resp.setMessage("Username/password don't match.");
+            return false;
+        }
+
+        const char* oldpass = req.getOldpass();
+        if(oldpass == NULL || strcmp(oldpass, user->credentials().getPassword()) != 0)
+        {
+            resp.setRetcode(-1);
+            resp.setMessage("Username/password don't match.");
+            return false;
+        }
+
+        const char* newpass1 = req.getNewpass1();
+        const char* newpass2 = req.getNewpass2();
+        if(newpass1 == NULL || newpass2 == NULL || strlen(newpass1) < 4 || strlen(newpass2) < 4)
+        {
+            resp.setRetcode(-1);
+            resp.setMessage("New password must be 4 characters or longer.");
+            return false;
+        }
+        if(strcmp(newpass1, newpass2) != 0)
+        {
+            resp.setRetcode(-1);
+            resp.setMessage("Password and retype don't match.");
+            return false;
+        }
+        if(strcmp(oldpass, newpass1) == 0)
+        {
+            resp.setRetcode(-1);
+            resp.setMessage("New password can't be the same as current password.");
+            return false;
+        }
+
+        const char* pwscheme = secmgr->getPasswordStorageScheme();
+        bool isCrypt = pwscheme && (stricmp(pwscheme, "CRYPT") == 0);
+        if(isCrypt && strncmp(oldpass, newpass1, 8) == 0)
+        {
+            resp.setRetcode(-1);
+            resp.setMessage("The first 8 characters of the new password must be different from before.");
+            return false;
+        }
+
+        bool ok = false;
+        try
+        {
+            ok = secmgr->updateUser(*user, newpass1);
+        }
+        catch(IException* e)
+        {
+            StringBuffer emsg;
+            e->errorMessage(emsg);
+            resp.setRetcode(-1);
+            resp.setMessage(emsg.str());
+            return false;
+        }
+        catch(...)
+        {
+            ok = false;
+        }
+
+        if(!ok)
+        {
+            throw MakeStringException(ECLWATCH_CANNOT_CHANGE_PASSWORD, "Failed in changing password.");
+        }
+
+        resp.setRetcode(0);
+        if(isCrypt && strlen(newpass1) > 8)
+            resp.setMessage("Your password has been changed successfully, however, only the first 8 chars are effective.");
+        else
+            resp.setMessage("Your password has been changed successfully.");
+    }
+    catch(IException* e)
+    {
+        FORWARDEXCEPTION(context, e, ECLWATCH_INTERNAL_ERROR);
+    }
+    return true;
+}
+
+bool Cws_accountEx::onUpdateUserInput(IEspContext &context, IEspUpdateUserInputRequest &req, IEspUpdateUserInputResponse &resp)
+{
+    try
+    {
+        ISecUser* user = context.queryUser();
+        if(user != NULL)
+        {
+            resp.setUsername(user->getName());
+        }
+    }
+    catch(IException* e)
+    {
+        FORWARDEXCEPTION(context, e, ECLWATCH_INTERNAL_ERROR);
+    }
+    return true;
+}
+
+bool Cws_accountEx::onWhoAmI(IEspContext &context, IEspWhoAmIRequest &req, IEspWhoAmIResponse &resp)
+{
+    try
+    {
+        ISecUser* user = context.queryUser();
+        if(user != NULL)
+        {
+            resp.setUsername(user->getName());
+        }
+    }
+    catch(IException* e)
+    {
+        FORWARDEXCEPTION(context, e, ECLWATCH_INTERNAL_ERROR);
+    }
+    return true;
+}
+
 bool Cws_accountEx::onVerifyUser(IEspContext &context, IEspVerifyUserRequest &req, IEspVerifyUserResponse &resp)
 {
     try

+ 103 - 13
esp/services/ws_account/ws_accountService.hpp

@@ -23,16 +23,16 @@
 
 class Cws_accountSoapBindingEx : public Cws_accountSoapBinding
 {
-    StringBuffer m_portalURL;
+    StringBuffer m_authType;
 
 public:
     Cws_accountSoapBindingEx(IPropertyTree *cfg, const char *name, const char *process, http_soap_log_level llevel=hsl_none) : Cws_accountSoapBinding(cfg, name, process, llevel)
     {
         StringBuffer xpath;
-        xpath.appendf("Software/EspProcess[@name='%s']/@portalurl", process);
-        const char* portalURL = cfg->queryProp(xpath.str());
-        if (portalURL && *portalURL)
-            m_portalURL.append(portalURL);
+        xpath.appendf("Software/EspProcess[@name='%s']/Authentication/@method", process);
+        const char* method = cfg->queryProp(xpath);
+        if (method && *method)
+            m_authType.append(method);
     }
 
     virtual void getNavigationData(IEspContext &context, IPropertyTree & data)
@@ -44,14 +44,99 @@ public:
             isFF = true;
 
         IPropertyTree *folder = ensureNavFolder(data, "My Account", "My Account");
-        StringBuffer path = "/WsSMC/NotInCommunityEdition?form_";
-        if (m_portalURL.length() > 0)
-            path.appendf("&EEPortal=%s", m_portalURL.str());
-
-        ensureNavLink(*folder, "Change Password", path.str(), "Change Password");
-        if (!isFF)
-            ensureNavLink(*folder, "Relogin", path.str(), "Relogin");
-        ensureNavLink(*folder, "Who Am I", path.str(), "WhoAmI");
+
+        const char* build_level = getBuildLevel();
+        if (!stricmp(m_authType.str(), "none") || !stricmp(m_authType.str(), "local"))
+        {
+            ensureNavLink(*folder, "Change Password", "/Ws_Access/SecurityNotEnabled?form_", "Change Password", NULL, NULL, 0, true);//Force the menu to use this setting
+            if (!isFF)
+                ensureNavLink(*folder, "Relogin", "/Ws_Access/SecurityNotEnabled?form_", "Relogin", NULL, NULL, 0, true);//Force the menu to use this setting
+            else
+                ensureNavLink(*folder, "Relogin", "/Ws_Access/FirefoxNotSupport?form_", "Relogin", NULL, NULL, 0, true);//Force the menu to use this setting
+            ensureNavLink(*folder, "Who Am I", "/Ws_Access/SecurityNotEnabled?form_", "WhoAmI", NULL, NULL, 0, true);//Force the menu to use this setting
+        }
+        else
+        {
+            ensureNavLink(*folder, "Change Password", "/Ws_Account/UpdateUserInput", "Change Password", NULL, NULL, 0, true);//Force the menu to use this setting
+            if (!isFF)
+                ensureNavLink(*folder, "Relogin", "/Ws_Account/LogoutUser", "Relogin", NULL, NULL, 0, true);//Force the menu to use this setting
+            else
+                ensureNavLink(*folder, "Relogin", "/Ws_Access/FirefoxNotSupport?form_", "Relogin", NULL, NULL, 0, true);//Force the menu to use this setting
+            ensureNavLink(*folder, "Who Am I", "/Ws_Account/WhoAmI", "WhoAmI", NULL, NULL, 0, true);//Force the menu to use this setting
+        }
+    }
+
+    int onGetInstantQuery(IEspContext &context, CHttpRequest* request, CHttpResponse* response, const char *service, const char *method)
+    {
+        if(!stricmp(method, "LogoutUser")||!stricmp(method, "LogoutUserRequest"))
+        {
+            CEspCookie* logincookie = request->queryCookie("RELOGIN");
+            if(logincookie == NULL || stricmp(logincookie->getValue(), "1") == 0)
+            {
+                response->addCookie(new CEspCookie("RELOGIN", "0"));
+
+                StringBuffer content(
+                "<html xmlns=\"http://www.w3.org/1999/xhtml\">"
+                    "<head>"
+                        "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/>"
+                        "<title>Enterprise Services Platform</title>"
+                    "</head>"
+                    "<body onLoad=\"location.href='/ws_account/LogoutUserCancel'\">"
+                    "</body>"
+                "</html>");
+
+                response->sendBasicChallenge("ESP", content.str());
+            }
+            else
+            {
+                response->addCookie(new CEspCookie("RELOGIN", "1"));
+                response->setContentType("text/html; charset=UTF-8");
+                StringBuffer content(
+                "<html xmlns=\"http://www.w3.org/1999/xhtml\">"
+                    "<head>"
+                        "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/>"
+                        "<title>Enterprise Services Platform</title>"
+                    "</head>"
+                    "<body>"
+                    "<br/><b>Relogin successful, you're now logged in as ");
+                content.append(context.queryUserId()).append(
+                    "</b>"
+                    "</body>"
+                    "</html>");
+
+                response->setContent(content.str());
+                response->send();
+            }
+
+            return 0;
+        }
+        else if(!stricmp(method, "LogoutUserCancel")||!stricmp(method, "LogoutUserRequest"))
+        {
+            CEspCookie* logincookie = request->queryCookie("RELOGIN");
+            response->addCookie(new CEspCookie("RELOGIN", "1"));
+            response->setContentType("text/html; charset=UTF-8");
+            StringBuffer content(
+            "<html xmlns=\"http://www.w3.org/1999/xhtml\">"
+                "<head>"
+                    "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/>"
+                    "<title>Enterprise Services Platform</title>"
+                    "<script type='text/javascript'>"
+                        "function closeWin() { top.opener=top; top.close(); }"
+                    "</script>"
+                "</head>"
+                "<body onload=\"javascript:closeWin();\">"
+                    "<br/><b>Relogin canceled, you're now still logged in as ");
+            content.append(context.queryUserId()).append(
+                "</b>"
+                "</body>"
+            "</html>");
+
+            response->setContent(content.str());
+            response->send();
+            return 0;
+        }
+        else
+            return Cws_accountSoapBinding::onGetInstantQuery(context, request, response, service, method);
     }
 };
 
@@ -60,6 +145,11 @@ class Cws_accountEx : public Cws_account
 public:
     IMPLEMENT_IINTERFACE;
 
+    virtual void init(IPropertyTree *cfg, const char *process, const char *service);
+
+    virtual bool onUpdateUser(IEspContext &context, IEspUpdateUserRequest &req, IEspUpdateUserResponse &resp);
+    virtual bool onUpdateUserInput(IEspContext &context, IEspUpdateUserInputRequest &req, IEspUpdateUserInputResponse &resp);
+    virtual bool onWhoAmI(IEspContext &context, IEspWhoAmIRequest &req, IEspWhoAmIResponse &resp);
     virtual bool onVerifyUser(IEspContext &context, IEspVerifyUserRequest &req, IEspVerifyUserResponse &resp);
 };