summaryrefslogtreecommitdiffstats
path: root/pki/dogtag/tps-ui/shared/docroot
diff options
context:
space:
mode:
authoralee <alee@c9f7a03b-bd48-0410-a16d-cbbf54688b0b>2009-01-27 19:06:40 +0000
committeralee <alee@c9f7a03b-bd48-0410-a16d-cbbf54688b0b>2009-01-27 19:06:40 +0000
commitea85f54a756ff1e6603cdee28a90785b3f8db08d (patch)
treeedc4f707f1746f9b6a600611d0ad5fd60147b5e3 /pki/dogtag/tps-ui/shared/docroot
parent54caba2ba7ffbfa451a1cc92e0c5096968ff20ba (diff)
downloadpki-ea85f54a756ff1e6603cdee28a90785b3f8db08d.tar.gz
pki-ea85f54a756ff1e6603cdee28a90785b3f8db08d.tar.xz
pki-ea85f54a756ff1e6603cdee28a90785b3f8db08d.zip
Bugzilla BZ# 479092: TPS roles enhancements
git-svn-id: svn+ssh://svn.fedorahosted.org/svn/pki/trunk@198 c9f7a03b-bd48-0410-a16d-cbbf54688b0b
Diffstat (limited to 'pki/dogtag/tps-ui/shared/docroot')
-rw-r--r--pki/dogtag/tps-ui/shared/docroot/tokendb/addResults.template4
-rw-r--r--pki/dogtag/tps-ui/shared/docroot/tokendb/delete.template12
-rw-r--r--pki/dogtag/tps-ui/shared/docroot/tokendb/deleteResults.template4
-rw-r--r--pki/dogtag/tps-ui/shared/docroot/tokendb/doToken.template11
-rw-r--r--pki/dogtag/tps-ui/shared/docroot/tokendb/doTokenConfirm.template11
-rw-r--r--pki/dogtag/tps-ui/shared/docroot/tokendb/edit.template10
-rw-r--r--pki/dogtag/tps-ui/shared/docroot/tokendb/editAdmin.template15
-rw-r--r--pki/dogtag/tps-ui/shared/docroot/tokendb/editAdminResults.template4
-rw-r--r--pki/dogtag/tps-ui/shared/docroot/tokendb/editUser.template313
-rw-r--r--pki/dogtag/tps-ui/shared/docroot/tokendb/index.template24
-rw-r--r--pki/dogtag/tps-ui/shared/docroot/tokendb/indexAdmin.template44
-rw-r--r--pki/dogtag/tps-ui/shared/docroot/tokendb/indexOperator.template136
-rw-r--r--pki/dogtag/tps-ui/shared/docroot/tokendb/newUser.template180
-rw-r--r--pki/dogtag/tps-ui/shared/docroot/tokendb/revoke.template11
-rw-r--r--pki/dogtag/tps-ui/shared/docroot/tokendb/search.template3
-rw-r--r--pki/dogtag/tps-ui/shared/docroot/tokendb/searchActivity.template10
-rw-r--r--pki/dogtag/tps-ui/shared/docroot/tokendb/searchActivityResults.template13
-rw-r--r--pki/dogtag/tps-ui/shared/docroot/tokendb/searchCertificate.template5
-rw-r--r--pki/dogtag/tps-ui/shared/docroot/tokendb/searchCertificateResults.template18
-rw-r--r--pki/dogtag/tps-ui/shared/docroot/tokendb/searchResults.template11
-rw-r--r--pki/dogtag/tps-ui/shared/docroot/tokendb/searchUser.template127
-rw-r--r--pki/dogtag/tps-ui/shared/docroot/tokendb/searchUserResults.template151
-rw-r--r--pki/dogtag/tps-ui/shared/docroot/tokendb/show.template43
-rw-r--r--pki/dogtag/tps-ui/shared/docroot/tokendb/showAdmin.template10
-rw-r--r--pki/dogtag/tps-ui/shared/docroot/tokendb/showCert.template14
-rwxr-xr-xpki/dogtag/tps-ui/shared/docroot/tokendb/userDelete.template175
26 files changed, 1315 insertions, 44 deletions
diff --git a/pki/dogtag/tps-ui/shared/docroot/tokendb/addResults.template b/pki/dogtag/tps-ui/shared/docroot/tokendb/addResults.template
index c02b2d9dc..0f154827a 100644
--- a/pki/dogtag/tps-ui/shared/docroot/tokendb/addResults.template
+++ b/pki/dogtag/tps-ui/shared/docroot/tokendb/addResults.template
@@ -60,11 +60,11 @@ document.write("<HR NOSHADE SIZE=1>\n");
if (typeof(tid) == "undefined") {
document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">\n");
- document.write("Missing token ID</font>\n");
+ document.write("Missing "+addType+" ID</font>\n");
document.write("<BR>\n<HR NOSHADE SIZE=1>\n");
} else {
document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">\n");
- document.write("New token record "+tid+" has been added.</font>\n");
+ document.write("New "+addType+" record "+tid+" has been added.</font>\n");
document.write("<BR>\n<HR NOSHADE SIZE=1>\n");
}
//-->
diff --git a/pki/dogtag/tps-ui/shared/docroot/tokendb/delete.template b/pki/dogtag/tps-ui/shared/docroot/tokendb/delete.template
index bb5dda0dc..1a48d9018 100644
--- a/pki/dogtag/tps-ui/shared/docroot/tokendb/delete.template
+++ b/pki/dogtag/tps-ui/shared/docroot/tokendb/delete.template
@@ -209,6 +209,18 @@ if (typeof(results) == "undefined" || results.length == 0) {
results[0].tokenPolicy+"</font>\n");
document.write("</td>\n");
document.write("</tr>\n");
+
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Token Type:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[0].tokenType+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
document.write("</table>\n");
document.write("<p>\n");
document.write("<b>System Information:</b>");
diff --git a/pki/dogtag/tps-ui/shared/docroot/tokendb/deleteResults.template b/pki/dogtag/tps-ui/shared/docroot/tokendb/deleteResults.template
index d15dd6827..20945aedb 100644
--- a/pki/dogtag/tps-ui/shared/docroot/tokendb/deleteResults.template
+++ b/pki/dogtag/tps-ui/shared/docroot/tokendb/deleteResults.template
@@ -61,11 +61,11 @@ document.write("<HR NOSHADE SIZE=1>\n");
if (typeof(tid) == "undefined") {
document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">\n");
- document.write("Missing token ID</font>\n");
+ document.write("Missing " + deleteType + " ID</font>\n");
document.write("<BR>\n<HR NOSHADE SIZE=1>\n");
} else {
document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">\n");
- document.write("Token record "+tid+" has been deleted.</font>\n");
+ document.write(deleteType + " record "+tid+" has been deleted.</font>\n");
document.write("<BR>\n<HR NOSHADE SIZE=1>\n");
}
//-->
diff --git a/pki/dogtag/tps-ui/shared/docroot/tokendb/doToken.template b/pki/dogtag/tps-ui/shared/docroot/tokendb/doToken.template
index e682df99f..432c008e6 100644
--- a/pki/dogtag/tps-ui/shared/docroot/tokendb/doToken.template
+++ b/pki/dogtag/tps-ui/shared/docroot/tokendb/doToken.template
@@ -228,6 +228,17 @@ if (rc == "0") {
document.write("</td>\n");
document.write("</tr>\n");
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Token Type:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[0].tokenType+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
document.write("</table>\n");
document.write("<p>\n");
document.write("<b>System Information:</b>");
diff --git a/pki/dogtag/tps-ui/shared/docroot/tokendb/doTokenConfirm.template b/pki/dogtag/tps-ui/shared/docroot/tokendb/doTokenConfirm.template
index 06b642ead..065334896 100644
--- a/pki/dogtag/tps-ui/shared/docroot/tokendb/doTokenConfirm.template
+++ b/pki/dogtag/tps-ui/shared/docroot/tokendb/doTokenConfirm.template
@@ -225,6 +225,17 @@ if (typeof(results) == "undefined" || results.length == 0) {
document.write("</td>\n");
document.write("</tr>\n");
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Token Type:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[0].tokenType+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
document.write("</table>\n");
document.write("<p>\n");
document.write("<b>System Information:</b>");
diff --git a/pki/dogtag/tps-ui/shared/docroot/tokendb/edit.template b/pki/dogtag/tps-ui/shared/docroot/tokendb/edit.template
index e94bdf91e..dc65bf20d 100644
--- a/pki/dogtag/tps-ui/shared/docroot/tokendb/edit.template
+++ b/pki/dogtag/tps-ui/shared/docroot/tokendb/edit.template
@@ -161,6 +161,16 @@ if (typeof(results) == "undefined" || results.length == 0) {
document.write("</td>\n");
document.write("</tr>\n");
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Token Type:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write(results[0].tokenType+"\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
document.write("</table>\n");
document.write("<BR>\n<HR NOSHADE SIZE=1>\n");
diff --git a/pki/dogtag/tps-ui/shared/docroot/tokendb/editAdmin.template b/pki/dogtag/tps-ui/shared/docroot/tokendb/editAdmin.template
index fea19cba3..c9db8bb09 100644
--- a/pki/dogtag/tps-ui/shared/docroot/tokendb/editAdmin.template
+++ b/pki/dogtag/tps-ui/shared/docroot/tokendb/editAdmin.template
@@ -99,7 +99,7 @@ function doSave(form) {
} else {
uri += uriBase;
}
- uri += "?op=save&tid="+results[0].cn;
+ uri += "?op=save_admin&tid="+results[0].cn;
if (results[0].tokenUserID != form.uid.value) {
uri += "&uid=" + form.uid.value;
@@ -189,6 +189,17 @@ if (typeof(results) == "undefined" || results.length == 0) {
document.write("</td>\n");
document.write("</tr>\n");
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Token Type:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[0].tokenType+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
document.write("</table>\n");
document.write("<BR>\n<HR NOSHADE SIZE=1>\n");
@@ -201,10 +212,10 @@ if (typeof(results) == "undefined" || results.length == 0) {
document.write("<td>\n");
document.write("<input TYPE=button VALUE=Cancel onClick=\"doCancel();\">");
document.write("</td>\n");
+ document.write("</form>\n");
document.write("</tr>\n");
document.write("</table>\n");
- document.write("</form>\n");
}
//-->
diff --git a/pki/dogtag/tps-ui/shared/docroot/tokendb/editAdminResults.template b/pki/dogtag/tps-ui/shared/docroot/tokendb/editAdminResults.template
index 07a25b833..91d39babc 100644
--- a/pki/dogtag/tps-ui/shared/docroot/tokendb/editAdminResults.template
+++ b/pki/dogtag/tps-ui/shared/docroot/tokendb/editAdminResults.template
@@ -61,11 +61,11 @@ document.write("<HR NOSHADE SIZE=1>\n");
if (typeof(tid) == "undefined") {
document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">\n");
- document.write("Missing token ID</font>\n");
+ document.write("Missing "+ editType + " ID</font>\n");
document.write("<BR>\n<HR NOSHADE SIZE=1>\n");
} else {
document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">\n");
- document.write("Token record "+tid+" has been updated.</font>\n");
+ document.write(editType + " record "+tid+" has been updated.</font>\n");
document.write("<BR>\n<HR NOSHADE SIZE=1>\n");
}
diff --git a/pki/dogtag/tps-ui/shared/docroot/tokendb/editUser.template b/pki/dogtag/tps-ui/shared/docroot/tokendb/editUser.template
new file mode 100644
index 000000000..acc18f59b
--- /dev/null
+++ b/pki/dogtag/tps-ui/shared/docroot/tokendb/editUser.template
@@ -0,0 +1,313 @@
+<!-- --- BEGIN COPYRIGHT BLOCK ---
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+
+ This library 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301 USA
+
+ Copyright (C) 2007 Red Hat, Inc.
+ All rights reserved.
+ --- END COPYRIGHT BLOCK --- -->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<HTML>
+<meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8">
+<HEAD>
+<TITLE>TPS</Title>
+</HEAD>
+
+<table border="0" width="100%" cellspacing="0" cellpadding="6">
+ <tr bgcolor="#666699">
+ <td width=25%>
+ <table border="0" cellspacing="0" cellpadding="6">
+ <tr>
+ <td nowrap><font size="-1" face="PrimaSans BT, Verdana, sans-serif" color="white">Dogtag<b>&reg;<br>
+ Certificate<br>System</b></font> </td>
+ </tr>
+ </table>
+ </td>
+ <td align=right width=65% nowrap><font size="+1" face="PrimaSans BT, Verdana, sans-serif" color="white">TPS Services</font></td>
+ <td width="10%">&nbsp;</td>
+ </tr>
+</table>
+<p>
+
+<BODY>
+
+<CMS_TEMPLATE>
+
+<SCRIPT type="text/JavaScript">
+<!--
+var uri0 = "";
+if (typeof(uriBase) == "undefined") {
+ uri0 += "/tus";
+} else {
+ uri0 += uriBase;
+}
+
+document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"+1\">"+
+ "<a href=\""+uri0+"\">Main Menu</a> : Administrator Operations : Edit User</font>\n");
+
+if ((typeof(flash) != "undefined") && (flash != "")) {
+ document.write("<table width=\"100%\"><tr><td align=\"left\">" +
+ "<font color=\"#ff0000\"><b>" + flash.replace(/\+/g, " ") + "</b><font>" +
+ "</td></tr></table>\n");
+}
+
+document.write("<table width=\"100%\"><tr><td align=\"right\">" +
+ "<b>UID:</b>" + userid
+ + "</td></tr></table>\n");
+document.write("<HR NOSHADE SIZE=1>\n");
+
+function validate_required(field,alerttxt) {
+ with (field) {
+ if (value==null||value=="") {
+ alert(alerttxt);
+ return false;
+ }
+ else {
+ return true;
+ }
+ }
+}
+
+function validate_form(thisform) {
+ with (thisform) {
+ if (validate_required(firstName,"First Name is required")==false) {
+ firstName.focus();
+ return false;
+ }
+ if (validate_required(lastName,"Last Name is required")==false) {
+ lastName.focus();
+ return false;
+ }
+ if (validate_required(userCert,"User Certificate is required")==false) {
+ userCert.focus();
+ return false;
+ }
+
+ }
+}
+
+function doUpdateUser(form) {
+ var uri = "";
+ if (typeof(uriBase) == "undefined") {
+ uri += "/tus";
+ } else {
+ uri += uriBase;
+ }
+ if (validate_form(this)) {
+ this.action = uri;
+ return true;
+ } else {
+ return false;
+ }
+}
+
+function doUpdateUserProfile(form) {
+ var uri = "";
+ if (typeof(uriBase) == "undefined") {
+ uri += "/tus";
+ } else {
+ uri += uriBase;
+ }
+ this.action = uri;
+ return true;
+}
+
+function doCancel() {
+ var uri = "";
+ if (typeof(uriBase) == "undefined") {
+ uri += "/tus";
+ } else {
+ uri += uriBase;
+ }
+ location.href = uri;
+}
+
+function doCheckBox(val) {
+ document.addUserProfileForm.other_profile.disabled = false;
+}
+
+
+
+if (typeof(results) == "undefined" || results.length == 0) {
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "User Not Found</font>\n");
+} else if (results.length > 1) {
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Found too many users to edit</font>\n");
+} else {
+ document.write("<BR>");
+ document.write("<form NAME =\"editUserForm\" METHOD=POST onSubmit=\"return doUpdateUser(this);\">");
+ document.write("<input TYPE=HIDDEN NAME=query VALUE=\"op=save_user\">");
+
+ document.write("<table BORDER=0 CELLSPACING=2 CELLPADDING=0 width=100%>\n");
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "UserID:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[0].uid+"</font>\n");
+ document.write("<input TYPE=HIDDEN NAME=uid VALUE=\"" + results[0].uid + "\">");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "First Name:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<input TYPE=TEXT NAME=firstName SIZE=20 VALUE="+results[0].cn.substring(0, results[0].cn.indexOf(" "))+">\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Last Name:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<input TYPE=TEXT NAME=lastName SIZE=20 VALUE="+results[0].sn+">\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Role:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td ><input type=checkbox name=opOperator value=Officers " + operator + ">Operator</td>\n");
+ document.write("<td ><input type=checkbox name=opAgent value=Agents " + agent + ">Agent</td>\n");
+ document.write("<td ><input type=checkbox name=opAdmin value=Administrators " + admin + ">Administrator</td>\n");
+ document.write("</tr>\n");
+
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "User Certificate:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ if ((typeof(results[0].userCertificate) == "undefined") || (results[0].userCertificate.length == 0) ) {
+ document.write("<textarea name=userCert cols=40 rows=10>\n");
+ document.write("Paste the base 64 user certificate here (without the header and footer)");
+ document.write("</textarea>\n");
+ } else {
+ document.write("<textarea name=userCert cols=40 rows=10>\n");
+ document.write(results[0].userCertificate.replace(/\.\./g, "\r\n"));
+ document.write("</textarea>\n");
+ }
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("</table>\n");
+
+ document.write("<BR>\n<HR NOSHADE SIZE=1>\n");
+
+ if ((typeof(results[0].profileID) != "undefined") && (results[0].profileID.length != 0)) {
+
+ var profile_array = results[0].profileID.split("#");
+ document.write("<input TYPE=HIDDEN NAME=nProfiles VALUE=\"" + profile_array.length + "\">");
+ document.write("<table BORDER=0 CELLSPACING=2 CELLPADDING=0 width=100%>\n");
+ document.write("<tr bgcolor=#e5e5e5>\n");
+
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Profile ID</font>\n");
+ document.write("</td>\n");
+
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Remove Profile Access</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ for (var i=0; i < profile_array.length; i++) {
+ document.write("<tr>\n");
+ document.write("<td>\n");
+ document.write(profile_array[i]);
+ document.write("<input type=hidden name=\"profile_" + i + "\" value=\""+ profile_array[i] + "\">");
+ document.write("</td>\n");
+ document.write("<td><input type=checkbox name=\"delete_" + i + "\" value=\"delete\"></td>\n");
+ document.write("</tr>\n");
+ }
+ document.write("</table>\n");
+ } else {
+ document.write("<p>Profile Memberships</p>");
+ }
+
+ document.write("<DIV ALIGN=RIGHT>\n");
+ document.write("<table BORDER=0 CELLSPACING=2 CELLPADDING=0>\n");
+ document.write("<tr>\n");
+ document.write("<td>\n");
+ document.write("<input TYPE=submit VALUE=Update>");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<input TYPE=button VALUE=Cancel onClick=\"doCancel();\">");
+ document.write("</td>\n");
+ document.write("</form>\n");
+ document.write("<td>\n");
+ document.write("<form name=deleteUser method=GET action='tus'>\n");
+ document.write("<input type=hidden name=op value=user_delete_confirm>");
+ document.write("<input type=hidden name=uid value=" + results[0].uid + ">");
+ document.write("<input TYPE=submit VALUE=\"Delete User\">");
+ document.write("</form>");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+ document.write("</table>\n");
+
+ document.write("<DIV ALIGN=LEFT>\n");
+ document.write("<table BORDER=0 CELLSPACING=2 CELLPADDING=0>\n");
+ document.write("<tr>\n");
+
+ if ((typeof(start_val) != "undefined") && (start_val > 0)) {
+ var new_start = start_val - 5;
+ if (new_start < 0) new_start =0;
+ document.write("<td> <form name=prev_edit method=get action=\"doCancel()\">");
+ document.write("<input TYPE=hidden name=op VALUE=edit_user>");
+ document.write("<input TYPE=hidden name=uid VALUE=" + results[0].uid + ">");
+ document.write("<input TYPE=hidden name=start_val VALUE=" + new_start + ">");
+ document.write("<input TYPE=submit VALUE=\"\<\"></form><td>\n");
+ }
+
+ if ((typeof(has_more_profile_vals) != "undefined") && (has_more_profile_vals == "true")) {
+ var new_start = end_val;
+ document.write("<td> <form method=get name=prev_edit action=\"doCancel()\">");
+ document.write("<input TYPE=hidden name=op VALUE=edit_user>");
+ document.write("<input TYPE=hidden name=uid VALUE=" + results[0].uid + ">");
+ document.write("<input TYPE=hidden name=start_val VALUE=" + new_start + ">");
+ document.write("<input TYPE=submit VALUE=\"\>\"></form><td>\n");
+ }
+ document.write("</tr>");
+
+ document.write("<form NAME =\"addUserProfileForm\" METHOD=POST onSubmit=\"return doUpdateUserProfile(this);\">");
+ document.write("<tr>");
+ document.write("<table BORDER=0 CELLSPACING=2 CELLPADDING=0 >\n");
+ document.write("<input TYPE=HIDDEN NAME=query VALUE=\"op=add_profile_user\">");
+ document.write("<input TYPE=HIDDEN NAME=uid VALUE=\"" + results[0].uid + "\">");
+ document.write("<td>Add new profile: <select name=\"profile_0\" onChange=\"doCheckbox(this.options[selectedIndex].value)\">");
+ for (var i=0; i < profile_list.length; i++) {
+ document.write("<option value=\""+ profile_list[i] + "\">" + profile_list[i] + "</option>\n");
+ }
+ document.write("</select></td>");
+ document.write("<td><input type=text name=other_profile></td>");
+ document.write("<td><input TYPE=submit VALUE=\"Add Profile\"></td></tr>");
+ document.write("</table>");
+ document.write("</form>\n");
+}
+
+//-->
+</SCRIPT>
+
+</BODY>
+</HTML>
diff --git a/pki/dogtag/tps-ui/shared/docroot/tokendb/index.template b/pki/dogtag/tps-ui/shared/docroot/tokendb/index.template
index 69c377f1a..c77c624cb 100644
--- a/pki/dogtag/tps-ui/shared/docroot/tokendb/index.template
+++ b/pki/dogtag/tps-ui/shared/docroot/tokendb/index.template
@@ -73,18 +73,28 @@ function doFind(form) {
location.href = uri;
}
}
+
+var lastCol = 100;
+document.write("<table BORDER=0 CELLSPACING=0 CELLPADDING=0 width=100%><tr>");
+if ((typeof(operatorAuth) != "undefined") && (operatorAuth == "true")) {
+ document.write("<td width=\"20%\"><a href=\"/tus?op=index_operator\">Operator Operations</td>");
+ lastCol -= 20;
+}
+if ((typeof(agentAuth) != "undefined") && (agentAuth == "true")) {
+ document.write("<td bgcolor=\"#e5e5e5\" width=\"20%\"><a href=\"/tus\">Agent Operations</td>");
+ lastCol -= 20;
+}
+if ((typeof(adminAuth) != "undefined") && (adminAuth == "true")) {
+ document.write("<td width=\"20%\"><a href=\"/tus?op=index_admin\">Administrator Operations</td>");
+ lastCol -= 20;
+}
+document.write("<td width=\"" + lastCol + "%\"></td>");
+document.write("</tr></table>");
//-->
</SCRIPT>
<table BORDER=0 CELLSPACING=0 CELLPADDING=0 width=100%>
<tr>
- <td bgcolor="#e5e5e5" width="20%"><a href="/tus">Agent Operations</td>
- <td width="20%"><a href="/tus?op=index_admin">Administrator Operations</td>
- <td width="60%"></td>
-</tr>
-</table>
-<table BORDER=0 CELLSPACING=0 CELLPADDING=0 width=100%>
-<tr>
<td bgcolor=#e5e5e5>&nbsp;</td>
</tr>
</table>
diff --git a/pki/dogtag/tps-ui/shared/docroot/tokendb/indexAdmin.template b/pki/dogtag/tps-ui/shared/docroot/tokendb/indexAdmin.template
index 7f5413409..ac25e4022 100644
--- a/pki/dogtag/tps-ui/shared/docroot/tokendb/indexAdmin.template
+++ b/pki/dogtag/tps-ui/shared/docroot/tokendb/indexAdmin.template
@@ -73,18 +73,27 @@ function doFind(form) {
location.href = uri;
}
}
+var lastCol = 100;
+document.write("<table BORDER=0 CELLSPACING=0 CELLPADDING=0 width=100%><tr>");
+if ((typeof(operatorAuth) != "undefined") && (operatorAuth == "true")) {
+ document.write("<td width=\"20%\"><a href=\"/tus?op=index_operator\">Operator Operations</td>");
+ lastCol -= 20;
+}
+if ((typeof(agentAuth) != "undefined") && (agentAuth == "true")) {
+ document.write("<td width=\"20%\"><a href=\"/tus\">Agent Operations</td>");
+ lastCol -=20;
+}
+if ((typeof(adminAuth) != "undefined") && (adminAuth == "true")) {
+ document.write("<td bgcolor=\"#e5e5e5\" width=\"20%\"><a href=\"/tus?op=index_admin\">Administrator Operations</td>");
+ lastCol -=20;
+}
+document.write("<td width=\"" + lastCol + "%\"></td>");
+document.write("</tr></table>");
//-->
</SCRIPT>
<table BORDER=0 CELLSPACING=0 CELLPADDING=0 width=100%>
<tr>
- <td width="20%"><a href="/tus">Agent Operations</td>
- <td bgcolor="#e5e5e5" width="20%"><a href="/tus?op=index_admin">Administrator Operations</td>
- <td width="60%"></td>
-</tr>
-</table>
-<table BORDER=0 CELLSPACING=0 CELLPADDING=0 width=100%>
-<tr>
<td bgcolor=#e5e5e5>&nbsp;</td>
</tr>
</table>
@@ -101,6 +110,27 @@ function doFind(form) {
<tr>
<td><li><a href="tus?op=search_admin">Search Tokens</a></td>
</tr>
+ <tr>
+ <td><i>Users</i></td>
+ </tr>
+ <tr>
+ <td><li><a href="tus?op=add_user?tid=&uid=">Add User</a></td>
+ </tr>
+ <tr>
+ <td><li><a href="tus?op=view_users">List Users</a></td>
+ </tr>
+ <tr>
+ <td><li><a href="tus?op=search_users">Search Users</a></td>
+ </tr>
+ <tr>
+ <td><i>Activities</i></td>
+ </tr>
+ <tr>
+ <td><li><a href="tus?op=view_activity">List Activities</a></td>
+ </tr>
+ <tr>
+ <td><li><a href="tus?op=search_activity">Search Activities</a></td>
+ </tr>
</table>
<HR NOSHADE SIZE=1>
<DIV ALIGN=RIGHT>
diff --git a/pki/dogtag/tps-ui/shared/docroot/tokendb/indexOperator.template b/pki/dogtag/tps-ui/shared/docroot/tokendb/indexOperator.template
new file mode 100644
index 000000000..838f8038d
--- /dev/null
+++ b/pki/dogtag/tps-ui/shared/docroot/tokendb/indexOperator.template
@@ -0,0 +1,136 @@
+<!-- --- BEGIN COPYRIGHT BLOCK ---
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+
+ This library 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301 USA
+
+ Copyright (C) 2007 Red Hat, Inc.
+ All rights reserved.
+ --- END COPYRIGHT BLOCK --- -->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<HTML>
+<meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8">
+<HEAD>
+<TITLE>TPS</Title>
+</HEAD>
+<table border="0" width="100%" cellspacing="0" cellpadding="6">
+ <tr bgcolor="#666699">
+ <td width=25%>
+ <table border="0" cellspacing="0" cellpadding="6">
+ <tr>
+ <td nowrap><font size="-1" face="PrimaSans BT, Verdana, sans-serif" color="white">Dogtag<b>&reg;<br>
+ Certificate<br>System</b></font> </td>
+ </tr>
+ </table>
+ </td>
+ <td align=right width=65% nowrap><font size="+1" face="PrimaSans BT, Verdana, sans-serif" color="white">TPS Services</font></td>
+ <td width="10%">&nbsp;</td>
+ </tr>
+</table>
+<p>
+
+<BODY>
+
+<CMS_TEMPLATE>
+
+<SCRIPT type="text/JavaScript">
+<!--
+var uri0 = "";
+if (typeof(uriBase) == "undefined") {
+ uri0 += "/tus";
+} else {
+ uri0 += uriBase;
+}
+
+document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"+1\">"+
+ "<a href=\""+uri0+"\">Main Menu</a></font>\n");
+document.write("<table width=\"100%\"><tr><td align=\"right\"><b>UID:</b>" +
+ userid + "</td></tr></table>\n");
+document.write("<HR NOSHADE SIZE=1>\n");
+
+function doFind(form) {
+ if (form.uid.value == "" && form.tid.value == "") {
+ alert("Enter token or user ID");
+ } else {
+ var uri = "";
+ if (typeof(uriBase) == "undefined") {
+ uri += "/tus"
+ } else {
+ uri += uriBase;
+ }
+ uri += "?op=view";
+ if (form.tid.value.length > 0) uri += "&tid=" + form.tid.value;
+ if (form.uid.value.length > 0) uri += "&uid=" + form.uid.value;
+ location.href = uri;
+ }
+}
+
+var lastCol = 100;
+document.write("<table BORDER=0 CELLSPACING=0 CELLPADDING=0 width=100%><tr>");
+if ((typeof(operatorAuth) != "undefined") && (operatorAuth == "true")) {
+ document.write("<td bgcolor=\"#e5e5e5\" width=\"20%\"><a href=\"/tus?op=index_operator\">Operator Operations</td>");
+ lastCol -= 20;
+}
+if ((typeof(agentAuth) != "undefined") && (agentAuth == "true")) {
+ document.write("<td width=\"20%\"><a href=\"/tus\">Agent Operations</td>");
+ lastCol -=20;
+}
+if ((typeof(adminAuth) != "undefined") && (adminAuth == "true")) {
+ document.write("<td width=\"20%\"><a href=\"/tus?op=index_admin\">Administrator Operations</td>");
+ lastCol -=20;
+}
+document.write("<td width=\"" + lastCol + "%\"></td>");
+document.write("</tr></table>");
+//-->
+</SCRIPT>
+
+<table BORDER=0 CELLSPACING=0 CELLPADDING=0 width=100%>
+<tr>
+ <td bgcolor=#e5e5e5>&nbsp;</td>
+</tr>
+</table>
+<table BORDER=0 CELLSPACING=2 CELLPADDING=0 width=100%>
+ <tr>
+ <td><i>Tokens</i></td>
+ </tr>
+ <tr>
+ <td><li><a href="tus?op=view?tid=&uid=&top=operator">List Tokens</a></td>
+ </tr>
+ <tr>
+ <td><li><a href="tus?op=search&top=operator">Search Tokens</a></td>
+ </tr>
+ <tr>
+ <td><i>Certificates</i></td>
+ </tr>
+ <tr>
+ <td><li><a href="tus?op=view_certificate?tid=&uid=&top=operator">List Certificates</a></td>
+ </tr>
+ <tr>
+ <td><li><a href="tus?op=search_certificate&top=operator">Search Certificates</a></td>
+ </tr>
+ <tr>
+ <td><i>Activities</i></td>
+ </tr>
+ <tr>
+ <td><li><a href="tus?op=view_activity&top=operator">List Activities</a></td>
+ </tr>
+ <tr>
+ <td><li><a href="tus?op=search_activity&top=operator">Search Activities</a></td>
+ </tr>
+ <tr>
+ <td></td>
+ </tr>
+</table>
+<HR NOSHADE SIZE=1>
+<DIV ALIGN=RIGHT>
+</BODY>
+</HTML>
diff --git a/pki/dogtag/tps-ui/shared/docroot/tokendb/newUser.template b/pki/dogtag/tps-ui/shared/docroot/tokendb/newUser.template
new file mode 100644
index 000000000..f434ba388
--- /dev/null
+++ b/pki/dogtag/tps-ui/shared/docroot/tokendb/newUser.template
@@ -0,0 +1,180 @@
+<!-- --- BEGIN COPYRIGHT BLOCK ---
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+
+ This library 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301 USA
+
+ Copyright (C) 2008 Red Hat, Inc.
+ All rights reserved.
+ --- END COPYRIGHT BLOCK --- -->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<HTML>
+<meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8">
+<HEAD>
+<TITLE>TPS</Title>
+</HEAD>
+
+<table border="0" width="100%" cellspacing="0" cellpadding="6">
+ <tr bgcolor="#666699">
+ <td width=25%>
+ <table border="0" cellspacing="0" cellpadding="6">
+ <tr>
+ <td nowrap><font size="-1" face="PrimaSans BT, Verdana, sans-serif" color="white">Dogtag<b>&reg;<br>
+ Certificate<br>System</b></font> </td>
+ </tr>
+ </table>
+ </td>
+ <td align=right width=65% nowrap><font size="+1" face="PrimaSans BT, Verdana, sans-serif" color="white">TPS Services</font></td>
+ <td width="10%">&nbsp;</td>
+ </tr>
+</table>
+<p>
+
+<BODY>
+
+<CMS_TEMPLATE>
+
+<SCRIPT type="text/JavaScript">
+<!--
+var uri0 = "";
+if (typeof(uriBase) == "undefined") {
+ uri0 += "/tus";
+} else {
+ uri0 += uriBase;
+}
+
+document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"+1\">"+
+ "<a href=\""+uri0+"\">Main Menu</a> : Admin Operations : Add New User</font>\n");
+document.write("<table width=\"100%\"><tr><td align=\"right\">" +
+ "<b>UID:</b>" +
+ userid + "</td></tr></table>\n");
+document.write("<HR NOSHADE SIZE=1>\n");
+
+function validate_required(field,alerttxt) {
+ with (field) {
+ if (value==null||value=="") {
+ alert(alerttxt);
+ return false;
+ }
+ else {
+ return true;
+ }
+ }
+}
+
+function validate_form(thisform) {
+ with (thisform) {
+ if (validate_required(userid,"Userid is required")==false) {
+ userid.focus();
+ return false;
+ }
+ if (validate_required(firstName,"First Name is required")==false) {
+ firstName.focus();
+ return false;
+ }
+ if (validate_required(lastName,"Last Name is required")==false) {
+ lastName.focus();
+ return false;
+ }
+ if (validate_required(groupid,"Group ID is required")==false) {
+ groupid.focus();
+ return false;
+ }
+
+ }
+}
+
+function doAdd(form) {
+ var uri = "";
+ if (typeof(uriBase) == "undefined") {
+ uri += "/tus"
+ } else {
+ uri += uriBase;
+ }
+ if (validate_form(this)) {
+ document.addUserForm.action = uri;
+ return true;
+ } else {
+ return false;
+ }
+}
+
+
+//-->
+</SCRIPT>
+
+<FORM NAME ="addUserForm" METHOD="POST" onSubmit="return doAdd(this)" >
+<input TYPE="hidden" NAME="query" VALUE="op=addUser">
+<table BORDER=0 CELLSPACING=2 CELLPADDING=0 width=100%>
+ <tr>
+ <td ALIGN=LEFT width=30%>
+ <font size=-1 face="PrimaSans BT, Verdana, sans-serif">
+ User ID:
+ </font>
+ </td>
+ <td>
+ <input TYPE=TEXT NAME=userid SIZE=20>
+ </td>
+ </tr>
+ <tr>
+ <td ALIGN=LEFT width=30%>
+ <font size=-1 face="PrimaSans BT, Verdana, sans-serif">
+ User First Name:
+ </font>
+ </td>
+ <td>
+ <input TYPE=TEXT NAME=firstName SIZE=20>
+ </td>
+ </tr>
+ <tr>
+ <td ALIGN=LEFT width=30%>
+ <font size=-1 face="PrimaSans BT, Verdana, sans-serif">
+ User Last Name:
+ </font>
+ </td>
+ <td>
+ <input TYPE=TEXT NAME=lastName SIZE=20>
+ </td>
+ </tr>
+ <tr>
+ <td ALIGN=LEFT width=30%>
+ <font size=-1 face="PrimaSans BT, Verdana, sans-serif">
+ Role:
+ </font>
+ </td>
+ <td> Operator
+ <input TYPE=CHECKBOX NAME=opOperator value="Officers" CHECKED>
+ &nbsp;&nbsp;&nbsp;&nbsp;Agent
+ <input TYPE=CHECKBOX NAME=opAgent value="Agents" >
+ &nbsp;&nbsp;&nbsp;&nbsp;Admin
+ <input TYPE=CHECKBOX NAME=opAdmin value="Administrators" >
+ </td>
+ </tr>
+ <tr>
+ <td ALIGN=LEFT width=30%>
+ <font size=-1 face="PrimaSans BT, Verdana, sans-serif">
+ Certificate:
+ </font>
+ </td>
+ <td>
+ <textarea name="cert" cols="40" rows="10" >
+Paste the base 64 user certificate here (without the header and footer)
+ </textarea>
+ </td>
+ </tr>
+</table>
+<HR NOSHADE SIZE=1>
+<DIV ALIGN=RIGHT>
+<input TYPE=submit VALUE="Add User" >
+</form>
+</BODY>
+</HTML>
diff --git a/pki/dogtag/tps-ui/shared/docroot/tokendb/revoke.template b/pki/dogtag/tps-ui/shared/docroot/tokendb/revoke.template
index 2d223287c..5b498b7eb 100644
--- a/pki/dogtag/tps-ui/shared/docroot/tokendb/revoke.template
+++ b/pki/dogtag/tps-ui/shared/docroot/tokendb/revoke.template
@@ -225,6 +225,17 @@ if (typeof(results) == "undefined" || results.length == 0) {
document.write("</td>\n");
document.write("</tr>\n");
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Token Type:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[0].tokenType+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
document.write("</table>\n");
document.write("<p>\n");
document.write("<b>System Information:</b>");
diff --git a/pki/dogtag/tps-ui/shared/docroot/tokendb/search.template b/pki/dogtag/tps-ui/shared/docroot/tokendb/search.template
index 929796080..b433429d3 100644
--- a/pki/dogtag/tps-ui/shared/docroot/tokendb/search.template
+++ b/pki/dogtag/tps-ui/shared/docroot/tokendb/search.template
@@ -70,6 +70,9 @@ function doFind(form) {
uri += "&tid=" + form.tid.value;
uri += "&uid=" + form.uid.value;
uri += "&maxCount=" + form.maxCount.value;
+ if ((typeof(topLevel) != "undefined") && (topLevel == "operator")) {
+ uri += "top=operator";
+ }
location.href = uri;
}
//-->
diff --git a/pki/dogtag/tps-ui/shared/docroot/tokendb/searchActivity.template b/pki/dogtag/tps-ui/shared/docroot/tokendb/searchActivity.template
index d271f0144..1057c5ec2 100644
--- a/pki/dogtag/tps-ui/shared/docroot/tokendb/searchActivity.template
+++ b/pki/dogtag/tps-ui/shared/docroot/tokendb/searchActivity.template
@@ -52,8 +52,13 @@ if (typeof(uriBase) == "undefined") {
uri0 += uriBase;
}
-document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"+1\">"+
+if ((typeof(topLevel) != "undefined") && (topLevel == "operator")) {
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"+1\">"+
+ "<a href=\""+uri0+"\">Main Menu</a> : Operator Operations : Search Activity</font>\n");
+} else {
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"+1\">"+
"<a href=\""+uri0+"\">Main Menu</a> : Agent Operations : Search Activity</font>\n");
+}
document.write("<table width=\"100%\"><tr><td align=\"right\">" +
"<b>UID:</b>" +
userid + "</td></tr></table>\n");
@@ -70,6 +75,9 @@ function doFind(form) {
uri += "&tid=" + form.tid.value;
uri += "&uid=" + form.uid.value;
uri += "&maxCount=" + form.maxCount.value;
+ if ((typeof(topLevel) != "undefined") && (topLevel == "operator")) {
+ uri += "top=operator";
+ }
location.href = uri;
}
//-->
diff --git a/pki/dogtag/tps-ui/shared/docroot/tokendb/searchActivityResults.template b/pki/dogtag/tps-ui/shared/docroot/tokendb/searchActivityResults.template
index 505ded271..dd4e17104 100644
--- a/pki/dogtag/tps-ui/shared/docroot/tokendb/searchActivityResults.template
+++ b/pki/dogtag/tps-ui/shared/docroot/tokendb/searchActivityResults.template
@@ -74,15 +74,20 @@ if (typeof(uriBase) == "undefined") {
uri += uriBase;
}
-document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"+1\">"+
+if ((typeof(topLevel) != "undefined") && (topLevel == "operator")) {
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"+1\">"+
+ "<a href=\""+uri+"\">Main Menu</a> : Operator Operations : Search Activity Results</font>\n");
+ uri += "?op=show&top=operator&tid=";
+} else {
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"+1\">"+
"<a href=\""+uri+"\">Main Menu</a> : Agent Operations : Search Activity Results</font>\n");
+ uri += "?op=show&tid=";
+}
document.write("<table width=\"100%\"><tr><td align=\"right\">" +
"<b>UID:</b>" +
userid + "</td></tr></table>\n");
document.write("<HR NOSHADE SIZE=1>\n");
-uri += "?op=show&tid=";
-
if (typeof(results) == "undefined" || results.length == 0) {
document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
"Token Not Found</font>\n");
@@ -139,7 +144,7 @@ if (typeof(results) == "undefined" || results.length == 0) {
results[i].cn+"</font>\n");
document.write("</td>\n");
document.write("<td>\n");
- document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\"><a href=\"/tus?op=show&tid="+
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\"><a href=\"" + uri +
results[i].tokenID+"\">" + results[i].tokenID + "</a></font>\n");
document.write("</td>\n");
document.write("<td>\n");
diff --git a/pki/dogtag/tps-ui/shared/docroot/tokendb/searchCertificate.template b/pki/dogtag/tps-ui/shared/docroot/tokendb/searchCertificate.template
index 9bb630cc5..668b1a8d7 100644
--- a/pki/dogtag/tps-ui/shared/docroot/tokendb/searchCertificate.template
+++ b/pki/dogtag/tps-ui/shared/docroot/tokendb/searchCertificate.template
@@ -53,7 +53,7 @@ if (typeof(uriBase) == "undefined") {
}
document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"+1\">"+
- "<a href=\""+uri0+"\">Main Menu</a> : Search Tokens</font>\n");
+ "<a href=\""+uri0+"\">Main Menu</a> : Search Certificates</font>\n");
document.write("<table width=\"100%\"><tr><td align=\"right\">" +
"<b>UID:</b>" +
userid + "</td></tr></table>\n");
@@ -70,6 +70,9 @@ function doFind(form) {
uri += "&tid=" + form.tid.value;
uri += "&uid=" + form.uid.value;
uri += "&maxCount=" + form.maxCount.value;
+ if ((typeof(topLevel) != "undefined") && (topLevel == "operator")) {
+ uri += "&top=operator";
+ }
location.href = uri;
}
//-->
diff --git a/pki/dogtag/tps-ui/shared/docroot/tokendb/searchCertificateResults.template b/pki/dogtag/tps-ui/shared/docroot/tokendb/searchCertificateResults.template
index 219ccf9a3..5b0104b6b 100644
--- a/pki/dogtag/tps-ui/shared/docroot/tokendb/searchCertificateResults.template
+++ b/pki/dogtag/tps-ui/shared/docroot/tokendb/searchCertificateResults.template
@@ -73,16 +73,22 @@ if (typeof(uriBase) == "undefined") {
} else {
uri += uriBase;
}
-
-document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"+1\">"+
+if ((typeof(topLevel) != "undefined") && (topLevel == "operator")) {
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"+1\">"+
+ "<a href=\""+uri+"\">Main Menu</a> : Operator Operations : Search Certificate Results</font>\n");
+ cert_uri = uri + "?op=show_certificate&top=operator&cn=";
+ uri += "?op=show&top=operator&tid=";
+} else {
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"+1\">"+
"<a href=\""+uri+"\">Main Menu</a> : Agent Operations : Search Certificate Results</font>\n");
+ cert_uri = uri + "?op=show_certificate&cn=";
+ uri += "?op=show&tid=";
+}
document.write("<table width=\"100%\"><tr><td align=\"right\">" +
"<b>UID:</b>" +
userid + "</td></tr></table>\n");
document.write("<HR NOSHADE SIZE=1>\n");
-uri += "?op=show&tid=";
-
if (typeof(results) == "undefined" || results.length == 0) {
document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
"Token Not Found</font>\n");
@@ -127,7 +133,7 @@ if (typeof(results) == "undefined" || results.length == 0) {
for (var i = 0; i < results.length; i++) {
document.write("<tr>\n");
document.write("<td>\n");
- document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\"><a href=\"/tus?op=show_certificate&cn="+
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\"><a href=\""+ cert_uri +
results[i].cn+"\">" + results[i].cn + "</a></font>\n");
document.write("</td>\n");
document.write("<td>\n");
@@ -139,7 +145,7 @@ if (typeof(results) == "undefined" || results.length == 0) {
results[i].tokenSubject+"</font>\n");
document.write("</td>\n");
document.write("<td>\n");
- document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\"><a href=\"/tus?op=show&tid="+
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\"><a href=\"" + uri +
results[i].tokenID+"\">" + results[i].tokenID + "</a></font>\n");
document.write("</td>\n");
document.write("<td>\n");
diff --git a/pki/dogtag/tps-ui/shared/docroot/tokendb/searchResults.template b/pki/dogtag/tps-ui/shared/docroot/tokendb/searchResults.template
index 833796ce6..5addf5cab 100644
--- a/pki/dogtag/tps-ui/shared/docroot/tokendb/searchResults.template
+++ b/pki/dogtag/tps-ui/shared/docroot/tokendb/searchResults.template
@@ -74,15 +74,20 @@ if (typeof(uriBase) == "undefined") {
uri += uriBase;
}
-document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"+1\">"+
+if ((typeof(topLevel) != "undefined") && (topLevel == "operator")) {
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"+1\">"+
+ "<a href=\""+uri+"\">Main Menu</a> : Operator Operations : Search Results</font>\n");
+ uri += "?op=show&top=operator&tid=";
+} else {
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"+1\">"+
"<a href=\""+uri+"\">Main Menu</a> : Agent Operations : Search Results</font>\n");
+ uri += "?op=show&tid=";
+}
document.write("<table width=\"100%\"><tr><td align=\"right\">" +
"<b>UID:</b>" +
userid + "</td></tr></table>\n");
document.write("<HR NOSHADE SIZE=1>\n");
-uri += "?op=show&tid=";
-
if (typeof(results) == "undefined" || results.length == 0) {
document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
"Token Not Found</font>\n");
diff --git a/pki/dogtag/tps-ui/shared/docroot/tokendb/searchUser.template b/pki/dogtag/tps-ui/shared/docroot/tokendb/searchUser.template
new file mode 100644
index 000000000..77aa9dd4f
--- /dev/null
+++ b/pki/dogtag/tps-ui/shared/docroot/tokendb/searchUser.template
@@ -0,0 +1,127 @@
+<!-- --- BEGIN COPYRIGHT BLOCK ---
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+
+ This library 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301 USA
+
+ Copyright (C) 2008 Red Hat, Inc.
+ All rights reserved.
+ --- END COPYRIGHT BLOCK --- -->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<HTML>
+<meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8">
+<HEAD>
+<TITLE>TPS</Title>
+</HEAD>
+
+<table border="0" width="100%" cellspacing="0" cellpadding="6">
+ <tr bgcolor="#666699">
+ <td width=25%>
+ <table border="0" cellspacing="0" cellpadding="6">
+ <tr>
+ <td nowrap><font size="-1" face="PrimaSans BT, Verdana, sans-serif" color="white">Dogtag<b>&reg;<br>
+ Certificate<br>System</b></font> </td>
+ </tr>
+ </table>
+ </td>
+ <td align=right width=65% nowrap><font size="+1" face="PrimaSans BT, Verdana, sans-serif" color="white">TPS Services</font></td>
+ <td width="10%">&nbsp;</td>
+ </tr>
+</table>
+<p>
+
+<BODY>
+
+<CMS_TEMPLATE>
+
+<SCRIPT type="text/JavaScript">
+<!--
+var uri0 = "";
+if (typeof(uriBase) == "undefined") {
+ uri0 += "/tus";
+} else {
+ uri0 += uriBase;
+}
+
+document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"+1\">"+
+ "<a href=\""+uri0+"\">Main Menu</a> : Administrator Operations : Search Users</font>\n");
+document.write("<table width=\"100%\"><tr><td align=\"right\">" +
+ "<b>UID:</b>" +
+ userid + "</td></tr></table>\n");
+document.write("<HR NOSHADE SIZE=1>\n");
+
+function doFind(form) {
+ var uri = "";
+ if (typeof(uriBase) == "undefined") {
+ uri += "/tus"
+ } else {
+ uri += uriBase;
+ }
+ uri += "?op=view_users";
+ uri += "&uid=" + form.uid.value;
+ uri += "&firstName=" + form.firstName.value;
+ uri += "&lastName=" + form.lastName.value;
+ uri += "&maxCount=" + form.maxCount.value;
+ location.href = uri;
+}
+//-->
+</SCRIPT>
+
+<FORM NAME ="findForm" ACTION="" METHOD=GET>
+<table BORDER=0 CELLSPACING=2 CELLPADDING=0 width=100%>
+ <tr>
+ <td ALIGN=LEFT width=30%>
+ <font size=-1 face="PrimaSans BT, Verdana, sans-serif">
+ User ID:
+ </font>
+ </td>
+ <td>
+ <input TYPE=TEXT NAME=uid SIZE=20>
+ </td>
+ </tr>
+ <tr>
+ <td ALIGN=LEFT width=30%>
+ <font size=-1 face="PrimaSans BT, Verdana, sans-serif">
+ First Name:
+ </font>
+ </td>
+ <td>
+ <input TYPE=TEXT NAME=firstName SIZE=20>
+ </td>
+ </tr>
+ <tr>
+ <td ALIGN=LEFT width=30%>
+ <font size=-1 face="PrimaSans BT, Verdana, sans-serif">
+ Last Name:
+ </font>
+ </td>
+ <td>
+ <input TYPE=TEXT NAME=lastName SIZE=20>
+ </td>
+ </tr>
+ <tr>
+ <td ALIGN=LEFT width=30%>
+ <font size=-1 face="PrimaSans BT, Verdana, sans-serif">
+ Max Count:
+ </font>
+ </td>
+ <td>
+ <input TYPE=TEXT NAME=maxCount SIZE=4 value="20">
+ </td>
+ </tr>
+</table>
+<HR NOSHADE SIZE=1>
+<DIV ALIGN=RIGHT>
+<input TYPE=button VALUE=Find onClick="doFind(findForm);">
+</form>
+</BODY>
+</HTML>
diff --git a/pki/dogtag/tps-ui/shared/docroot/tokendb/searchUserResults.template b/pki/dogtag/tps-ui/shared/docroot/tokendb/searchUserResults.template
new file mode 100644
index 000000000..da2d07266
--- /dev/null
+++ b/pki/dogtag/tps-ui/shared/docroot/tokendb/searchUserResults.template
@@ -0,0 +1,151 @@
+<!-- --- BEGIN COPYRIGHT BLOCK ---
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+
+ This library 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301 USA
+
+ Copyright (C) 2008 Red Hat, Inc.
+ All rights reserved.
+ --- END COPYRIGHT BLOCK --- -->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<HTML>
+<meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8">
+<HEAD>
+<TITLE>TPS</Title>
+</HEAD>
+
+<table border="0" width="100%" cellspacing="0" cellpadding="6">
+ <tr bgcolor="#666699">
+ <td width=25%>
+ <table border="0" cellspacing="0" cellpadding="6">
+ <tr>
+ <td nowrap><font size="-1" face="PrimaSans BT, Verdana, sans-serif" color="white">Dogtag<b>&reg;<br>
+ Certificate<br>System</b></font> </td>
+ </tr>
+ </table>
+ </td>
+ <td align=right width=65% nowrap><font size="+1" face="PrimaSans BT, Verdana, sans-serif" color="white">TPS Services</font></td>
+ <td width="10%">&nbsp;</td>
+ </tr>
+</table>
+<p>
+
+<BODY>
+
+<CMS_TEMPLATE>
+
+<SCRIPT type="text/JavaScript">
+<!--
+function checkDate(str) {
+ var newString;
+
+ if (str.length == 15 && str.charAt(14) == 'Z') {
+ newString = str.substring(0, 4);
+ newString += '/';
+ newString += str.substring(4, 6);
+ newString += '/';
+ newString += str.substring(6, 8);
+ newString += ' ';
+ newString += str.substring(8, 10);
+ newString += ':';
+ newString += str.substring(10, 12);
+ newString += ':';
+ newString += str.substring(12, 14);
+ } else {
+ newString = str;
+ }
+
+ return newString;
+}
+
+var uri = "";
+if (typeof(uriBase) == "undefined") {
+ uri += "/tus";
+} else {
+ uri += uriBase;
+}
+
+document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"+1\">"+
+ "<a href=\""+uri+"\">Main Menu</a> : Administrator Operations : Search Results</font>\n");
+document.write("<table width=\"100%\"><tr><td align=\"right\">" +
+ "<b>UID:</b>" +
+ userid + "</td></tr></table>\n");
+document.write("<HR NOSHADE SIZE=1>\n");
+
+uri += "?op=edit_user&uid=";
+
+if (typeof(results) == "undefined" || results.length == 0) {
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "User Not Found</font>\n");
+} else {
+ document.write("<BR>");
+ document.write("<table BORDER=0 CELLSPACING=2 CELLPADDING=0 width=100%>\n");
+ document.write("<tr bgcolor=#e5e5e5>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "User ID</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Name</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Date Created</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Date Modified</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ for (var i = 0; i < results.length; i++) {
+ document.write("<tr>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "<a href=\""+uri+results[i].uid+"\">"+
+ results[i].uid+"</a></font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[i].cn+"</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ checkDate(results[i].createTimeStamp)+"</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ checkDate(results[i].modifyTimeStamp)+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+ }
+ document.write("</table>\n");
+ document.write("<BR>\n<HR NOSHADE SIZE=1>\n");
+ if (typeof(results) != "undefined" && results.length > 0) {
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-2\">");
+ if (typeof(results) != "undefined" || results.length == 0) {
+ if (typeof(limited) != "undefined" && typeof(total) != "undefined") {
+ document.write("<br>" + limited + " of " + total + "\n");
+ } else if (typeof(total) != "undefined") {
+ document.write("<br>Total: " + total + "\n");
+ }
+ }
+ document.write("</font>");
+ }
+}
+
+//-->
+</SCRIPT>
+
+</BODY>
+</HTML>
diff --git a/pki/dogtag/tps-ui/shared/docroot/tokendb/show.template b/pki/dogtag/tps-ui/shared/docroot/tokendb/show.template
index dd5922f6f..8b9c3b71b 100644
--- a/pki/dogtag/tps-ui/shared/docroot/tokendb/show.template
+++ b/pki/dogtag/tps-ui/shared/docroot/tokendb/show.template
@@ -52,8 +52,13 @@ if (typeof(uriBase) == "undefined") {
uri0 += uriBase;
}
-document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"+1\">"+
+if ((typeof(topLevel) != "undefined") && (topLevel == "operator")) {
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"+1\">"+
+ "<a href=\""+uri0+"\">Main Menu</a> : Operator Operations : Token Details</font>\n");
+} else {
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"+1\">"+
"<a href=\""+uri0+"\">Main Menu</a> : Agent Operations : Token Details</font>\n");
+}
document.write("<table width=\"100%\"><tr><td align=\"right\">" +
"<b>UID:</b>" +
userid + "</td></tr></table>\n");
@@ -225,6 +230,17 @@ if (typeof(results) == "undefined" || results.length == 0) {
document.write("</td>\n");
document.write("</tr>\n");
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Token Type:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[0].tokenType+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
document.write("</table>\n");
document.write("<p>\n");
document.write("<b>System Information:</b>");
@@ -281,19 +297,36 @@ if (typeof(results) == "undefined" || results.length == 0) {
document.write("<table BORDER=0 CELLSPACING=2 CELLPADDING=0>\n");
document.write("<tr>\n");
document.write("<td width=60%>\n");
- document.write("<form method='get' action='tus'><select name=\"question\"><option value=\"1\">This token has been physically damaged.</option><option value=\"2\">This token has been permanently lost.</option><option value=\"3\">This token has been temporarily lost.</option><option value=\"4\">This temporarily lost token has been found.</option><option value=\"5\">This temporarily lost token cannot be found (becomes permanently lost).</option><option value=\"6\">This token has been terminated.</option></select><input type=hidden name=op value=do_confirm_token><input type=hidden name=tid value=" + results[0].cn + "><input TYPE=submit VALUE=\"Go\"></form>");
+
+ if ((typeof(topLevel) == "undefined") || (topLevel != "operator")) {
+ document.write("<form method='get' action='tus'><select name=\"question\"><option value=\"1\">This token has been physically damaged.</option><option value=\"2\">This token has been permanently lost.</option><option value=\"3\">This token has been temporarily lost.</option><option value=\"4\">This temporarily lost token has been found.</option><option value=\"5\">This temporarily lost token cannot be found (becomes permanently lost).</option><option value=\"6\">This token has been terminated.</option></select><input type=hidden name=op value=do_confirm_token><input type=hidden name=tid value=" + results[0].cn + "><input TYPE=submit VALUE=\"Go\"></form>");
+ }
document.write("</td>\n");
document.write("<td align=right width=10%>\n");
document.write("</td>\n");
+
document.write("<td align=right width=10%>\n");
- document.write("<form method='get' action='tus'><input type=hidden name=op value=edit><input type=hidden name=tid value=" + results[0].cn + "><input TYPE=submit VALUE=\"Edit\"></form>");
+ if ((typeof(topLevel) == "undefined") || (topLevel != "operator")) {
+ document.write("<form method='get' action='tus'><input type=hidden name=op value=edit><input type=hidden name=tid value=" + results[0].cn + "><input TYPE=submit VALUE=\"Edit\"></form>");
+ }
document.write("</td>\n");
+
document.write("<td align=right width=10%>\n");
- document.write("<form method='get' action='tus'><input type=hidden name=op value=view_certificate><input type=hidden name=tid value=" + results[0].cn + "><input TYPE=submit VALUE=\"Show Certificates\"></form>");
+ if ((typeof(topLevel) == "undefined") || (topLevel != "operator")) {
+ document.write("<form method='get' action='tus'><input type=hidden name=op value=view_certificate><input type=hidden name=tid value=" + results[0].cn + "><input TYPE=submit VALUE=\"Show Certificates\"></form>");
+ } else {
+ document.write("<form method='get' action='tus'><input type=hidden name=op value=view_certificate><input type=hidden name=top value=operator><input type=hidden name=tid value=" + results[0].cn + "><input TYPE=submit VALUE=\"Show Certificates\"></form>");
+ }
document.write("</td>\n");
+
document.write("<td align=right width=10%>\n");
- document.write("<form method='get' action='tus'><input type=hidden name=op value=view_activity><input type=hidden name=tid value=" + results[0].cn + "><input TYPE=submit VALUE=\"Show Activities\"></form>");
+ if ((typeof(topLevel) == "undefined") || (topLevel != "operator")) {
+ document.write("<form method='get' action='tus'><input type=hidden name=op value=view_activity><input type=hidden name=tid value=" + results[0].cn + "><input TYPE=submit VALUE=\"Show Activities\"></form>");
+ } else {
+ document.write("<form method='get' action='tus'><input type=hidden name=op value=view_activity><input type=hidden name=top value=operator><input type=hidden name=tid value=" + results[0].cn + "><input TYPE=submit VALUE=\"Show Activities\"></form>");
+ }
document.write("</td>\n");
+
document.write("</tr>\n");
document.write("</table>\n");
diff --git a/pki/dogtag/tps-ui/shared/docroot/tokendb/showAdmin.template b/pki/dogtag/tps-ui/shared/docroot/tokendb/showAdmin.template
index c4f182773..04a61b1a7 100644
--- a/pki/dogtag/tps-ui/shared/docroot/tokendb/showAdmin.template
+++ b/pki/dogtag/tps-ui/shared/docroot/tokendb/showAdmin.template
@@ -219,6 +219,16 @@ if (typeof(results) == "undefined" || results.length == 0) {
results[0].tokenPolicy+"</font>\n");
document.write("</td>\n");
document.write("</tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Token Type:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[0].tokenType+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
document.write("</table>\n");
document.write("<p>\n");
document.write("<b>System Information:</b>");
diff --git a/pki/dogtag/tps-ui/shared/docroot/tokendb/showCert.template b/pki/dogtag/tps-ui/shared/docroot/tokendb/showCert.template
index a9c4822f0..33d3d50b9 100644
--- a/pki/dogtag/tps-ui/shared/docroot/tokendb/showCert.template
+++ b/pki/dogtag/tps-ui/shared/docroot/tokendb/showCert.template
@@ -52,8 +52,13 @@ if (typeof(uriBase) == "undefined") {
uri0 += uriBase;
}
-document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"+1\">"+
+if ((typeof(topLevel) != "undefined") && (topLevel == "operator")) {
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"+1\">"+
+ "<a href=\""+uri0+"\">Main Menu</a> : Operator Operations : Certificate Details</font>\n");
+} else {
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"+1\">"+
"<a href=\""+uri0+"\">Main Menu</a> : Agent Operations : Certificate Details</font>\n");
+}
document.write("<table width=\"100%\"><tr><td align=\"right\">" +
"<b>UID:</b>" +
userid + "</td></tr></table>\n");
@@ -203,8 +208,13 @@ if (typeof(results) == "undefined" || results.length == 0) {
"Token ID:&nbsp;</font>\n");
document.write("</td>\n");
document.write("<td>\n");
- document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\"><a href=\"tus?op=show&tid=" + results[0].tokenID + "\">"+
+ if ((typeof(topLevel) != "undefined") && (topLevel == "operator")) {
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\"><a href=\"tus?op=show&top=operator&tid=" + results[0].tokenID + "\">"+
results[0].tokenID+"</a></font>\n");
+ } else {
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\"><a href=\"tus?op=show&tid=" + results[0].tokenID + "\">"+
+ results[0].tokenID+"</a></font>\n");
+ }
document.write("</td>\n");
document.write("</tr>\n");
diff --git a/pki/dogtag/tps-ui/shared/docroot/tokendb/userDelete.template b/pki/dogtag/tps-ui/shared/docroot/tokendb/userDelete.template
new file mode 100755
index 000000000..18c30f76f
--- /dev/null
+++ b/pki/dogtag/tps-ui/shared/docroot/tokendb/userDelete.template
@@ -0,0 +1,175 @@
+<!-- --- BEGIN COPYRIGHT BLOCK ---
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+
+ This library 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301 USA
+
+ Copyright (C) 2007 Red Hat, Inc.
+ All rights reserved.
+ --- END COPYRIGHT BLOCK --- -->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<HTML>
+<meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8">
+<HEAD>
+<TITLE>TPS</Title>
+</HEAD>
+
+<table border="0" width="100%" cellspacing="0" cellpadding="6">
+ <tr bgcolor="#666699">
+ <td width=25%>
+ <table border="0" cellspacing="0" cellpadding="6">
+ <tr>
+ <td nowrap><font size="-1" face="PrimaSans BT, Verdana, sans-serif" color="white">Dogtag<b>&reg;<br>
+ Certificate<br>System</b></font> </td>
+ </tr>
+ </table>
+ </td>
+ <td align=right width=65% nowrap><font size="+1" face="PrimaSans BT, Verdana, sans-serif" color="white">TPS Services</font></td>
+ <td width="10%">&nbsp;</td>
+ </tr>
+</table>
+<p>
+
+<BODY>
+
+<CMS_TEMPLATE>
+
+<SCRIPT type="text/JavaScript">
+<!--
+var uri0 = "";
+if (typeof(uriBase) == "undefined") {
+ uri0 += "/tus";
+} else {
+ uri0 += uriBase;
+}
+
+document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"+1\">"+
+ "<a href=\""+uri0+"\">Main Menu</a> : Administrator Operations : Delete User</font>\n");
+document.write("<table width=\"100%\"><tr><td align=\"right\">" +
+ "<b>UID:</b>" +
+ userid + "</td></tr></table>\n");
+document.write("<HR NOSHADE SIZE=1>\n");
+
+function doDeleteUser(form) {
+ var uri = "";
+ if (typeof(uriBase) == "undefined") {
+ uri += "/tus";
+ } else {
+ uri += uriBase;
+ }
+ this.action = uri;
+ return true;
+}
+
+function doCancel() {
+ var uri = "";
+ if (typeof(uriBase) == "undefined") {
+ uri += "/tus";
+ } else {
+ uri += uriBase;
+ }
+ location.href = uri;
+}
+
+
+
+if (typeof(results) == "undefined" || results.length == 0) {
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "User Not Found</font>\n");
+} else if (results.length > 1) {
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Found too many users to edit</font>\n");
+} else {
+ document.write("<BR>");
+ document.write("<form NAME =\"deleteUserForm\" METHOD=POST onSubmit=\"return doDeleteUser(this);\">");
+ document.write("<input TYPE=HIDDEN NAME=query VALUE=\"op=do_delete_user\">");
+
+ document.write("<table BORDER=0 CELLSPACING=2 CELLPADDING=0 width=100%>\n");
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "UserID:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[0].uid+"</font>\n");
+ document.write("<input TYPE=HIDDEN NAME=uid VALUE=\"" + results[0].uid + "\">");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "First Name:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write(results[0].cn.substring(0, results[0].cn.indexOf(" ")));
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Last Name:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write(results[0].sn);
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Role:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td ><input type=checkbox name=opOperator value=Officers disabled=true " + operator + ">Operator</td>\n");
+ document.write("<td ><input type=checkbox name=opAgent value=Agents disabled=true " + agent + ">Agent</td>\n");
+ document.write("<td ><input type=checkbox name=opAdmin value=Administrators disabled=true " + admin + ">Administrator</td>\n");
+ document.write("</tr>\n");
+
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "User Certificate:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<textarea name=userCert disabled=true cols=40 rows=10>\n");
+ document.write(results[0].userCertificate);
+ document.write("</textarea>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("</table>\n");
+ document.write("<BR>\n<HR NOSHADE SIZE=1>\n");
+
+ document.write("<DIV ALIGN=RIGHT>\n");
+ document.write("<table BORDER=0 CELLSPACING=2 CELLPADDING=0>\n");
+ document.write("<tr>\n");
+ document.write("<td>\n");
+ document.write("Are you sure?");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<input TYPE=button VALUE=Cancel onClick=\"doCancel();\">");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<input TYPE=submit VALUE=Delete>");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+ document.write("</table>\n");
+ document.write("</form>");
+}
+
+//-->
+</SCRIPT>
+
+</BODY>
+</HTML>