summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pki/base/tps/doc/CS.cfg4
-rw-r--r--pki/base/tps/src/modules/tokendb/mod_tokendb.cpp264
-rw-r--r--pki/base/tps/src/tus/tus_db.c10
-rw-r--r--pki/dogtag/tps-ui/dogtag-pki-tps-ui.spec4
-rw-r--r--pki/dogtag/tps-ui/shared/docroot/tokendb/edit.template6
-rw-r--r--pki/dogtag/tps-ui/shared/docroot/tokendb/editAdmin.template225
-rw-r--r--pki/dogtag/tps-ui/shared/docroot/tokendb/index.template3
-rw-r--r--pki/dogtag/tps-ui/shared/docroot/tokendb/indexAdmin.template7
-rw-r--r--pki/dogtag/tps-ui/shared/docroot/tokendb/searchActivityAdmin.template (renamed from pki/dogtag/tps-ui/shared/docroot/tokendb/editAdminResults.template)70
-rw-r--r--pki/dogtag/tps-ui/shared/docroot/tokendb/searchActivityAdminResults.template195
-rw-r--r--pki/dogtag/tps-ui/shared/docroot/tokendb/showAdmin.template5
-rw-r--r--pki/dogtag/tps/pki-tps.spec4
12 files changed, 400 insertions, 397 deletions
diff --git a/pki/base/tps/doc/CS.cfg b/pki/base/tps/doc/CS.cfg
index b48667228..0c57db31b 100644
--- a/pki/base/tps/doc/CS.cfg
+++ b/pki/base/tps/doc/CS.cfg
@@ -1356,12 +1356,12 @@ tokendb.deleteResultTemplate=deleteResults.template
tokendb.searchActivityTemplate=searchActivity.template
tokendb.searchCertificateTemplate=searchCertificate.template
tokendb.searchActivityResultTemplate=searchActivityResults.template
+tokendb.searchActivityAdminTemplate=searchActivityAdmin.template
+tokendb.searchActivityAdminResultTemplate=searchActivityAdminResults.template
tokendb.showAdminTemplate=showAdmin.template
tokendb.doTokenTemplate=doToken.template
tokendb.doTokenConfirmTemplate=doTokenConfirm.template
tokendb.revokeTemplate=revoke.template
-tokendb.editAdminTemplate=editAdmin.template
-tokendb.editAdminResultTemplate=editAdminResults.template
tokendb.searchAdminTemplate=searchAdmin.template
tokendb.searchAdminResultTemplate=searchAdminResults.template
tokendb.defaultPolicy=RE_ENROLL=YES
diff --git a/pki/base/tps/src/modules/tokendb/mod_tokendb.cpp b/pki/base/tps/src/modules/tokendb/mod_tokendb.cpp
index 2d1766b0c..5dff3bb58 100644
--- a/pki/base/tps/src/modules/tokendb/mod_tokendb.cpp
+++ b/pki/base/tps/src/modules/tokendb/mod_tokendb.cpp
@@ -157,8 +157,8 @@ static char *searchActivityTemplate = NULL;
static char *searchCertificateTemplate = NULL;
static char *searchCertificateResultTemplate = NULL;
static char *searchActivityResultTemplate = NULL;
-static char *editAdminTemplate = NULL;
-static char *editAdminResultTemplate = NULL;
+static char *searchActivityAdminTemplate = NULL;
+static char *searchActivityAdminResultTemplate = NULL;
static char *editTemplate = NULL;
static char *editResultTemplate = NULL;
static char *showTemplate = NULL;
@@ -1612,6 +1612,33 @@ int get_tus_config( char *name )
}
}
+ if( ( s = PL_strstr( buf, "tokendb.searchActivityAdminTemplate=" ) ) != NULL) {
+ s += PL_strlen( "tokendb.searchActivityAdminTemplate=" );
+ v = s;
+
+ while( *s != '\x0D' && *s != '\x0A' && *s != '\0' &&
+ ( PRUint32 ) ( s - buf ) < size ) {
+ s++;
+ }
+
+ n = s - v;
+
+ s = PL_strndup( v, n );
+ if( s != NULL ) {
+ if( searchActivityAdminTemplate != NULL ) {
+ PL_strfree( searchActivityAdminTemplate );
+ searchActivityAdminTemplate = NULL;
+ }
+ searchActivityAdminTemplate = s;
+ } else {
+ if( buf != NULL ) {
+ PR_Free( buf );
+ buf = NULL;
+ }
+ return 0;
+ }
+ }
+
if( ( s = PL_strstr( buf, "tokendb.searchCertificateResultTemplate=" ) ) !=
NULL ) {
s += PL_strlen( "tokendb.searchCertificateResultTemplate=" );
@@ -1938,8 +1965,8 @@ int get_tus_config( char *name )
}
}
- if( ( s = PL_strstr( buf, "tokendb.editAdminTemplate=" ) ) != NULL ) {
- s += PL_strlen( "tokendb.editAdminTemplate=" );
+ if( ( s = PL_strstr( buf, "tokendb.searchActivityAdminResultTemplate=" ) ) != NULL ) {
+ s += PL_strlen( "tokendb.searchActivityAdminResultTemplate=" );
v = s;
while( *s != '\x0D' && *s != '\x0A' && *s != '\0' &&
@@ -1951,11 +1978,11 @@ int get_tus_config( char *name )
s = PL_strndup( v, n );
if( s != NULL ) {
- if( editAdminTemplate != NULL ) {
- PL_strfree( editAdminTemplate );
- editAdminTemplate = NULL;
+ if( searchActivityAdminResultTemplate != NULL ) {
+ PL_strfree( searchActivityAdminResultTemplate );
+ searchActivityAdminResultTemplate = NULL;
}
- editAdminTemplate = s;
+ searchActivityAdminResultTemplate = s;
} else {
if( buf != NULL ) {
PR_Free( buf );
@@ -2019,34 +2046,6 @@ int get_tus_config( char *name )
}
}
- if( ( s = PL_strstr( buf, "tokendb.editAdminResultTemplate=" ) ) !=
- NULL ) {
- s += PL_strlen( "tokendb.editAdminResultTemplate=" );
- v = s;
-
- while( *s != '\x0D' && *s != '\x0A' && *s != '\0' &&
- ( PRUint32 ) ( s - buf ) < size ) {
- s++;
- }
-
- n = s - v;
-
- s = PL_strndup( v, n );
- if( s != NULL ) {
- if( editAdminResultTemplate != NULL ) {
- PL_strfree( editAdminResultTemplate );
- editAdminResultTemplate = NULL;
- }
- editAdminResultTemplate = s;
- } else {
- if( buf != NULL ) {
- PR_Free( buf );
- buf = NULL;
- }
- return 0;
- }
- }
-
if( ( s = PL_strstr( buf, "tokendb.editResultTemplate=" ) ) != NULL ) {
s += PL_strlen( "tokendb.editResultTemplate=" );
v = s;
@@ -2600,7 +2599,7 @@ mod_tokendb_handler( request_rec *rq )
buf = NULL;
}
- return DECLINED;
+ return DONE;
}
} else {
tokendbDebug( "token DB was initialized\n" );
@@ -2616,7 +2615,7 @@ mod_tokendb_handler( request_rec *rq )
if( cert == NULL ) {
error_out("Authentication Failure", "Failed to authenticate request");
do_free(buf);
- return DECLINED;
+ return DONE;
}
tokendbDebug( cert );
@@ -2633,7 +2632,7 @@ mod_tokendb_handler( request_rec *rq )
error_out("Authentication Failure", "Failed to authenticate request");
do_free(buf);
- return DECLINED;
+ return DONE;
}
/* authorization */
@@ -2680,7 +2679,7 @@ mod_tokendb_handler( request_rec *rq )
do_free(uri);
do_free(query);
- return DECLINED;
+ return DONE;
}
PR_snprintf( injection, MAX_INJECTION_SIZE,
@@ -2700,7 +2699,7 @@ mod_tokendb_handler( request_rec *rq )
do_free(buf);
do_free(uri);
do_free(query);
- return DECLINED;
+ return DONE;
}
PR_snprintf( injection, MAX_INJECTION_SIZE,
@@ -2719,7 +2718,7 @@ mod_tokendb_handler( request_rec *rq )
do_free(buf);
do_free(uri);
do_free(query);
- return DECLINED;
+ return DONE;
}
PR_snprintf( injection, MAX_INJECTION_SIZE,
@@ -2739,7 +2738,7 @@ mod_tokendb_handler( request_rec *rq )
do_free(buf);
do_free(uri);
do_free(query);
- return DECLINED;
+ return DONE;
}
/* XXX - chrisho */
@@ -2932,7 +2931,7 @@ mod_tokendb_handler( request_rec *rq )
do_free(uri);
do_free(query);
- return DECLINED;
+ return DONE;
} else if( rc > 0 ) {
tokendbDebug( "token is physically damaged. rc > 0\n" );
@@ -2956,7 +2955,7 @@ mod_tokendb_handler( request_rec *rq )
do_free(uri);
do_free(query);
- return DECLINED;
+ return DONE;
}
/* Is this token permanently lost? */
@@ -3110,7 +3109,7 @@ mod_tokendb_handler( request_rec *rq )
do_free(uri);
do_free(query);
- return DECLINED;
+ return DONE;
} else if( rc > 0 ) {
PR_snprintf( injection, MAX_INJECTION_SIZE,
"%s%s%s%s%s", JS_START,
@@ -3132,7 +3131,7 @@ mod_tokendb_handler( request_rec *rq )
do_free(uri);
do_free(query);
- return DECLINED;
+ return DONE;
}
/* Is this token temporarily lost? */
@@ -3268,7 +3267,7 @@ mod_tokendb_handler( request_rec *rq )
do_free(uri);
do_free(query);
- return DECLINED;
+ return DONE;
} else if( rc > 0 ) {
PR_snprintf( injection, MAX_INJECTION_SIZE,
"%s%s%s%s%s", JS_START,
@@ -3290,7 +3289,7 @@ mod_tokendb_handler( request_rec *rq )
do_free(uri);
do_free(query);
- return DECLINED;
+ return DONE;
}
/* Is this temporarily lost token found? */
@@ -3407,7 +3406,7 @@ mod_tokendb_handler( request_rec *rq )
do_free(uri);
do_free(query);
- return DECLINED;
+ return DONE;
} else if( rc > 0 ) {
ldap_error_out("LDAP mod error: ", "LDAP error: %s");
@@ -3415,7 +3414,7 @@ mod_tokendb_handler( request_rec *rq )
do_free(uri);
do_free(query);
- return DECLINED;
+ return DONE;
}
/* Does this temporarily lost token become permanently lost? */
@@ -3577,7 +3576,7 @@ mod_tokendb_handler( request_rec *rq )
do_free(buf);
do_free(uri);
do_free(query);
- return DECLINED;
+ return DONE;
}
/* XXX - chrisho */
@@ -3593,18 +3592,37 @@ mod_tokendb_handler( request_rec *rq )
PL_strcat(injection, JS_STOP);
buf = getData( revokeTemplate, injection );
- } else if( ( PL_strstr( query, "op=search_activity" ) ) ) {
+ } else if( ( PL_strstr( query, "op=search_activity_admin" ) ) ) {
tokendbDebug( "authorization\n" );
- /* check removed - all roles permit this
+ if (! is_admin) {
+ error_out("Authorization Failure", "Failed to authorize request");
+ do_free(buf);
+ do_free(uri);
+ do_free(query);
+ return DONE;
+ }
+
+ PR_snprintf( injection, MAX_INJECTION_SIZE,
+ "%s%s%s%s%s%s%s", JS_START,
+ "var uriBase = \"", uri, "\";\n",
+ "var userid = \"", userid,
+ "\";\n" );
+
+ add_authorization_data(userid, is_admin, is_operator, is_agent, injection);
+ PL_strcat(injection, JS_STOP);
- if ((! is_agent) && (! is_operator) && (! is_admin)) {
+ buf = getData( searchActivityAdminTemplate, injection );
+ } else if( ( PL_strstr( query, "op=search_activity" ) ) ) {
+ tokendbDebug( "authorization\n" );
+
+ if ((! is_agent) && (! is_operator)) {
error_out("Authorization Failure", "Failed to authorize request");
do_free(buf);
do_free(uri);
do_free(query);
- return DECLINED;
- } */
+ return DONE;
+ }
PR_snprintf( injection, MAX_INJECTION_SIZE,
"%s%s%s%s%s%s%s", JS_START,
@@ -3631,7 +3649,7 @@ mod_tokendb_handler( request_rec *rq )
do_free(uri);
do_free(query);
- return DECLINED;
+ return DONE;
}
PR_snprintf( injection, MAX_INJECTION_SIZE,
@@ -3654,7 +3672,7 @@ mod_tokendb_handler( request_rec *rq )
do_free(buf);
do_free(uri);
do_free(query);
- return DECLINED;
+ return DONE;
}
PR_snprintf( injection, MAX_INJECTION_SIZE,
@@ -3679,7 +3697,7 @@ mod_tokendb_handler( request_rec *rq )
do_free(buf);
do_free(uri);
do_free(query);
- return DECLINED;
+ return DONE;
}
PR_snprintf( injection, MAX_INJECTION_SIZE,
@@ -3699,12 +3717,13 @@ mod_tokendb_handler( request_rec *rq )
buf = getData( searchTemplate, injection );
} else if( ( PL_strstr( query, "op=new" ) ) ) {
tokendbDebug( "authorization\n" );
- if( ! is_agent ) {
+ if( ! is_admin ) {
error_out("Authorization Failure", "Failed to authorize request");
do_free(buf);
do_free(uri);
do_free(query);
- return DECLINED;
+ return DONE;
+
}
PR_snprintf( injection, MAX_INJECTION_SIZE,
@@ -3724,7 +3743,7 @@ mod_tokendb_handler( request_rec *rq )
do_free(uri);
do_free(query);
- return DECLINED;
+ return DONE;
}
PR_snprintf( injection, MAX_INJECTION_SIZE,
@@ -3738,6 +3757,7 @@ mod_tokendb_handler( request_rec *rq )
buf = getData( newUserTemplate,injection );
} else if( ( PL_strstr( query, "op=view_admin" ) ) ||
( PL_strstr( query, "op=view_certificate" ) ) ||
+ ( PL_strstr( query, "op=view_activity_admin" ) ) ||
( PL_strstr( query, "op=view_activity" ) ) ||
( PL_strstr( query, "op=view_users" ) ) ||
( PL_strstr( query, "op=view" ) ) ||
@@ -3751,6 +3771,7 @@ mod_tokendb_handler( request_rec *rq )
( PL_strstr( query, "op=confirm" ) ) ) {
if( ( PL_strstr( query, "op=confirm" ) ) ||
( PL_strstr( query, "op=view_admin" ) ) ||
+ ( PL_strstr( query, "op=view_activity_admin" ) ) ||
( PL_strstr( query, "op=show_admin" ) ) ||
( PL_strstr( query, "op=view_users") ) ||
( PL_strstr( query, "op=edit_user") ) ||
@@ -3764,7 +3785,7 @@ mod_tokendb_handler( request_rec *rq )
do_free(uri);
do_free(query);
- return DECLINED;
+ return DONE;
}
} else if ((PL_strstr(query, "op=edit")) ||
(PL_strstr(query, "do_confirm_token"))) {
@@ -3776,7 +3797,7 @@ mod_tokendb_handler( request_rec *rq )
do_free(uri);
do_free(query);
- return DECLINED;
+ return DONE;
}
} else if (PL_strstr(query, "op=view_activity")) {
tokendbDebug( "authorization for view_activity\n" );
@@ -3799,11 +3820,12 @@ mod_tokendb_handler( request_rec *rq )
do_free(uri);
do_free(query);
- return DECLINED;
+ return DONE;
}
}
- if( PL_strstr( query, "op=view_activity" ) ) {
+ if ((PL_strstr( query, "op=view_activity_admin")) ||
+ (PL_strstr( query, "op=view_activity" ) )) {
getActivityFilter( filter, query );
} else if( PL_strstr( query, "op=view_certificate" ) ) {
getCertificateFilter( filter, query );
@@ -3839,7 +3861,8 @@ mod_tokendb_handler( request_rec *rq )
}
}
- if( PL_strstr( query, "op=view_activity" ) ) {
+ if (( PL_strstr( query, "op=view_activity_admin" )) ||
+ ( PL_strstr( query, "op=view_activity" ) )) {
status = find_tus_activity_entries_no_vlv( complete_filter, &result, 0 );
} else if( PL_strstr( query, "op=view_certificate" ) ) {
@@ -3884,7 +3907,7 @@ mod_tokendb_handler( request_rec *rq )
do_free(uri);
do_free(query);
- return DECLINED;
+ return DONE;
}
do_free(complete_filter);
@@ -3902,7 +3925,14 @@ mod_tokendb_handler( request_rec *rq )
PL_strcat( injection, "\";\n" );
if( nEntries > 1 ) {
- if( sendInPieces && PL_strstr( query, "op=view_activity" ) ) {
+ if( sendInPieces && PL_strstr( query, "op=view_activity_admin" ) ) {
+ buf = getTemplateFile( searchActivityAdminResultTemplate,
+ &tagOffset );
+ if( buf != NULL && tagOffset >= 0 ) {
+ ( void ) ap_rwrite( ( const void * ) buf, tagOffset, rq );
+ sendPieces = 1;
+ }
+ } else if( sendInPieces && PL_strstr( query, "op=view_activity" ) ) {
buf = getTemplateFile( searchActivityResultTemplate,
&tagOffset );
if( buf != NULL && tagOffset >= 0 ) {
@@ -3974,7 +4004,8 @@ mod_tokendb_handler( request_rec *rq )
}
/* get attributes to be displayed to the user */
- if( PL_strstr( query, "op=view_activity" ) ) {
+ if (( PL_strstr( query, "op=view_activity_admin" ) ) ||
+ ( PL_strstr( query, "op=view_activity" ) )) {
attrs = get_activity_attributes();
} else if( PL_strstr( query, "op=view_certificate" ) ) {
attrs = get_certificate_attributes();
@@ -4235,12 +4266,12 @@ mod_tokendb_handler( request_rec *rq )
buf = NULL;
}
} else {
- if( PL_strstr( query, "op=view_activity" ) ) {
+ if( PL_strstr( query, "op=view_activity_admin" ) ) {
+ buf = getData( searchActivityAdminResultTemplate, injection );
+ } else if( PL_strstr( query, "op=view_activity" ) ) {
buf = getData( searchActivityResultTemplate, injection );
} else if( PL_strstr( query, "op=view_certificate" ) ) {
buf = getData( searchCertificateResultTemplate, injection );
- } else if( PL_strstr( query, "op=edit_admin" ) ) {
- buf = getData( editAdminTemplate, injection );
} else if( PL_strstr( query, "op=show_admin" ) ) {
buf = getData( showAdminTemplate, injection );
} else if( PL_strstr( query, "op=view_admin" ) ) {
@@ -4283,7 +4314,7 @@ mod_tokendb_handler( request_rec *rq )
do_free(uri);
do_free(query);
- return DECLINED;
+ return DONE;
}
uid = get_post_field(post, "uid", SHORT_LEN);
char *profile = get_post_field(post, "profile_0", SHORT_LEN);
@@ -4345,7 +4376,7 @@ mod_tokendb_handler( request_rec *rq )
do_free(uri);
do_free(query);
- return DECLINED;
+ return DONE;
}
// first save user details
uid = get_post_field(post, "uid", SHORT_LEN);
@@ -4375,7 +4406,7 @@ mod_tokendb_handler( request_rec *rq )
do_free(opAgent);
do_free(opAdmin);
- return DECLINED;
+ return DONE;
}
if ((opOperator != NULL) && (PL_strstr(opOperator, OPERATOR))) {
@@ -4465,59 +4496,6 @@ mod_tokendb_handler( request_rec *rq )
ap_internal_redirect_handler(injection, rq);
return OK;
- } else if( PL_strstr( query, "op=save_admin" ) ) {
- tokendbDebug( "authorization\n" );
-
- if( ! is_admin ) {
- error_out("Authorization Failure", "Failed to authorize request");
- do_free(buf);
- do_free(uri);
- do_free(query);
-
- return DECLINED;
- }
-
- getCN( filter, query );
-
- mNum = parse_modification_number( query );
-
- mods = getModifications( query );
-
- if( mNum != NULL ) {
- status = check_and_modify_tus_db_entry( userid, filter,
- mNum, mods );
-
- PL_strfree( mNum );
-
- mNum = NULL;
- } else {
- status = modify_tus_db_entry( userid, filter, mods );
- }
-
- if( mods != NULL ) {
- free_modifications( mods, 0 );
-
- mods = NULL;
- }
-
- if( status != LDAP_SUCCESS ) {
- ldap_error_out("LDAP modify error: ", "LDAP error: %s");
- do_free(buf);
- do_free(uri);
- do_free(query);
- return DECLINED;
- }
-
- PR_snprintf( injection, MAX_INJECTION_SIZE,
- "%s%s%s%s%s%s%s%s%s%s%s", JS_START,
- "var uriBase = \"", uri, "\";\n",
- "var userid = \"", userid, "\";\n",
- "var editType = \"Token\";\n",
- "var tid = \"", filter, "\";\n");
- add_authorization_data(userid, is_admin, is_operator, is_agent, injection);
- PL_strcat(injection, JS_STOP);
-
- buf = getData( editAdminResultTemplate, injection );
} else if( PL_strstr( query, "op=save" ) ) {
tokendbDebug( "authorization\n" );
@@ -4526,7 +4504,7 @@ mod_tokendb_handler( request_rec *rq )
do_free(buf);
do_free(uri);
do_free(query);
- return DECLINED;
+ return DONE;
}
getCN( filter, query );
@@ -4554,7 +4532,7 @@ mod_tokendb_handler( request_rec *rq )
do_free(buf);
do_free(uri);
do_free(query);
- return DECLINED;
+ return DONE;
}
PR_snprintf( injection, MAX_INJECTION_SIZE,
@@ -4576,7 +4554,7 @@ mod_tokendb_handler( request_rec *rq )
do_free(uri);
do_free(query);
- return DECLINED;
+ return DONE;
}
uid = get_post_field(post, "uid", SHORT_LEN);
@@ -4593,7 +4571,7 @@ mod_tokendb_handler( request_rec *rq )
do_free(opAdmin);
do_free(opAgent);
- return DECLINED;
+ return DONE;
}
if (opOperator != NULL) {
@@ -4634,7 +4612,7 @@ mod_tokendb_handler( request_rec *rq )
do_free(query);
do_free(uid);
- return DECLINED;
+ return DONE;
}
PR_snprintf((char *)msg, 256,
@@ -4662,7 +4640,7 @@ mod_tokendb_handler( request_rec *rq )
do_free(uri);
do_free(query);
- return DECLINED;
+ return DONE;
}
uid = get_post_field(post, "userid", SHORT_LEN);
@@ -4727,7 +4705,7 @@ mod_tokendb_handler( request_rec *rq )
}
}
- if ((opAgent != NULL) && (PL_strstr(opOperator, AGENT))) {
+ if ((opAgent != NULL) && (PL_strstr(opAgent, AGENT))) {
status = add_user_to_role_db_entry(userid, uid, AGENT);
if ((status!= LDAP_SUCCESS) && (status != LDAP_TYPE_OR_VALUE_EXISTS)) {
PR_snprintf(msg, 512, "Error adding user %s to role %s", uid, AGENT);
@@ -4783,7 +4761,7 @@ mod_tokendb_handler( request_rec *rq )
do_free(buf);
do_free(uri);
do_free(query);
- return DECLINED;
+ return DONE;
}
getCN( filter, query );
@@ -4804,7 +4782,7 @@ mod_tokendb_handler( request_rec *rq )
do_free(buf);
do_free(uri);
do_free(query);
- return DECLINED;
+ return DONE;
}
status = add_default_tus_db_entry( NULL, userid,
@@ -4816,7 +4794,7 @@ mod_tokendb_handler( request_rec *rq )
do_free(buf);
do_free(uri);
do_free(query);
- return DECLINED;
+ return DONE;
}
PR_snprintf( injection, MAX_INJECTION_SIZE,
@@ -4840,7 +4818,7 @@ mod_tokendb_handler( request_rec *rq )
do_free(uri);
do_free(query);
- return DECLINED;
+ return DONE;
}
getCN( filter, query );
@@ -4865,7 +4843,7 @@ mod_tokendb_handler( request_rec *rq )
do_free(uri);
do_free(query);
- return DECLINED;
+ return DONE;
}
PR_snprintf( injection, MAX_INJECTION_SIZE,
@@ -4887,7 +4865,7 @@ mod_tokendb_handler( request_rec *rq )
do_free(uri);
do_free(query);
- return DECLINED;
+ return DONE;
}
getTemplateName( template1, query );
diff --git a/pki/base/tps/src/tus/tus_db.c b/pki/base/tps/src/tus/tus_db.c
index 3ab7ae1d0..4f120cf4a 100644
--- a/pki/base/tps/src/tus/tus_db.c
+++ b/pki/base/tps/src/tus/tus_db.c
@@ -786,7 +786,13 @@ TPS_PUBLIC char *get_authorized_profiles(const char *userid, int is_admin)
nVals = ldap_count_values(vals);
if (nVals == 1) {
if (PL_strstr(vals[0], ALL_PROFILES)) {
- PR_snprintf(ret, 4096, ALL_PROFILES);
+ if (is_admin) {
+ // all profiles
+ PR_snprintf(ret, 4096, ALL_PROFILES);
+ } else {
+ // all profile except admin no token events
+ PR_snprintf(ret, 4096, "(!(tokenType=%s))", NO_TOKEN_TYPE);
+ }
} else {
if (is_admin) {
PL_strcat(ret, "(|(tokenType=");
@@ -2208,7 +2214,7 @@ TPS_PUBLIC int add_user_db_entry(const char *agentid, char *userid, char *userPa
userCert_values[0] = &berval;
userCert_values[1] = NULL;
- a06.mod_op =0;
+ a06.mod_op = LDAP_MOD_BVALUES;
a06.mod_type = USER_CERT;
a06.mod_values = userCert_values;
diff --git a/pki/dogtag/tps-ui/dogtag-pki-tps-ui.spec b/pki/dogtag/tps-ui/dogtag-pki-tps-ui.spec
index 20c30016a..f62264f8f 100644
--- a/pki/dogtag/tps-ui/dogtag-pki-tps-ui.spec
+++ b/pki/dogtag/tps-ui/dogtag-pki-tps-ui.spec
@@ -34,7 +34,7 @@
## Package Header Definitions
%define base_name %{base_ui_prefix}-%{base_prefix}-%{base_component}
%define base_version 1.0.0
-%define base_release 8
+%define base_release 9
%define base_group System Environment/Base
%define base_vendor Red Hat, Inc.
%define base_license GPLv2 with exceptions
@@ -222,6 +222,8 @@ rm -rf ${RPM_BUILD_ROOT}
###############################################################################
%changelog
+* Thur Feb 26 2009 Ade Lee <alee@redhat.com> 1.0.0-9
+- Bugzilla Bug 484275 and 483304: TPS roles defined and correcting error templates
* Thu Feb 26 2009 Matthew Harmsen <mharmsen@redhat.com> 1.0.0-8
- Bugzilla Bug #458337 - Provide separate listening ports for CS
* Wed Feb 25 2009 Jack Magne <jmagne@redhat.com> 1.0.0-7
diff --git a/pki/dogtag/tps-ui/shared/docroot/tokendb/edit.template b/pki/dogtag/tps-ui/shared/docroot/tokendb/edit.template
index dc65bf20d..165467717 100644
--- a/pki/dogtag/tps-ui/shared/docroot/tokendb/edit.template
+++ b/pki/dogtag/tps-ui/shared/docroot/tokendb/edit.template
@@ -90,6 +90,10 @@ function doSave(form) {
}
uri += "?op=save&tid="+results[0].cn;
+ if (results[0].tokenUserID != form.uid.value) {
+ uri += "&uid=" + form.uid.value;
+ }
+
if (results[0].tokenPolicy != form.tokenPolicy.value) {
uri += "&tokenPolicy=" + form.tokenPolicy.value;
}
@@ -137,7 +141,7 @@ if (typeof(results) == "undefined" || results.length == 0) {
"User ID:&nbsp;</font>\n");
document.write("</td>\n");
document.write("<td>\n");
- document.write(results[0].tokenUserID+"\n");
+ document.write("<input TYPE=TEXT NAME=uid SIZE=20 VALUE="+results[0].tokenUserID+">\n");
document.write("</td>\n");
document.write("</tr>\n");
diff --git a/pki/dogtag/tps-ui/shared/docroot/tokendb/editAdmin.template b/pki/dogtag/tps-ui/shared/docroot/tokendb/editAdmin.template
deleted file mode 100644
index c9db8bb09..000000000
--- a/pki/dogtag/tps-ui/shared/docroot/tokendb/editAdmin.template
+++ /dev/null
@@ -1,225 +0,0 @@
-<!-- --- 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 Token</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 trim(str) {
- var i, k, newString;
-
- for (i = 0; i < str.length; i++) {
- if (str.charAt(i) != ' ' )
- break;
- }
- for (k = str.length - 1; k >= i; k--) {
- if (str.charAt(k) != ' ' ) {
- k++;
- break;
- }
- }
-
- if (k > i)
- newString = str.substring(i, k);
- else
- newString = null;
-
- return newString;
-}
-
-function doSave(form) {
- if (form.uid.value.length > 0) {
- var trimmedList = "";
- var uids = form.uid.value.split(',');
-
- for (var i=0; i < uids.length; i++) {
- if (i > 0) trimmedList += ",";
- trimmedList += trim(uids[i]);
- }
- form.uid.value = trimmedList;
- }
-
- var uri = "";
- if (typeof(uriBase) == "undefined") {
- uri += "/tus";
- } else {
- uri += uriBase;
- }
- uri += "?op=save_admin&tid="+results[0].cn;
-
- if (results[0].tokenUserID != form.uid.value) {
- uri += "&uid=" + form.uid.value;
- }
- if (results[0].tokenPolicy != form.tokenPolicy.value) {
- uri += "&tokenPolicy=" + form.tokenPolicy.value;
- }
- if (results[0].tokenReason != form.tokenReason.value) {
- uri += "&tokenReason=" + form.tokenReason.value;
- }
- uri += "&m=" + results[0].modified;
- location.href = uri;
-}
-
-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\">"+
- "Token Not Found</font>\n");
-} else if (results.length > 1) {
- document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
- "Found too many tokens to edit</font>\n");
-} else {
- document.write("<BR>");
- document.write("<FORM NAME =\"editForm\" ACTION=\"\" METHOD=GET>");
-
- 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\">"+
- "Token:&nbsp;</font>\n");
- document.write("</td>\n");
- document.write("<td>\n");
- document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
- results[0].cn+"</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\">"+
- "User ID:&nbsp;</font>\n");
- document.write("</td>\n");
- document.write("<td>\n");
- document.write("<input TYPE=TEXT NAME=uid SIZE=20 VALUE="+results[0].tokenUserID+">\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\">"+
- "Status:&nbsp;</font>\n");
- document.write("</td>\n");
- document.write("<td>\n");
- document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
- results[0].tokenStatus+"</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\">"+
- "Reason:&nbsp;</font>\n");
- document.write("</td>\n");
- document.write("<td>\n");
- document.write("<input TYPE=TEXT NAME=tokenReason SIZE=20 VALUE="+results[0].tokenReason+">\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\">"+
- "Policy:&nbsp;</font>\n");
- document.write("</td>\n");
- document.write("<td>\n");
- document.write("<input TYPE=TEXT NAME=tokenPolicy SIZE=20 VALUE="+results[0].tokenPolicy+">\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("<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("<input TYPE=button VALUE=Save onClick=\"doSave(editForm);\">");
- 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("</tr>\n");
- document.write("</table>\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 c77c624cb..6c5299a4f 100644
--- a/pki/dogtag/tps-ui/shared/docroot/tokendb/index.template
+++ b/pki/dogtag/tps-ui/shared/docroot/tokendb/index.template
@@ -109,9 +109,6 @@ document.write("</tr></table>");
<td><li><a href="tus?op=search">Search Tokens</a></td>
</tr>
<tr>
- <td><li><a href="tus?op=new">Add New Token</a></td>
- </tr>
- <tr>
<td><i>Certificates</i></td>
</tr>
<tr>
diff --git a/pki/dogtag/tps-ui/shared/docroot/tokendb/indexAdmin.template b/pki/dogtag/tps-ui/shared/docroot/tokendb/indexAdmin.template
index ac25e4022..28dce4d5c 100644
--- a/pki/dogtag/tps-ui/shared/docroot/tokendb/indexAdmin.template
+++ b/pki/dogtag/tps-ui/shared/docroot/tokendb/indexAdmin.template
@@ -110,6 +110,9 @@ document.write("</tr></table>");
<tr>
<td><li><a href="tus?op=search_admin">Search Tokens</a></td>
</tr>
+ <tr>
+ <td><li><a href="tus?op=new">Add New Token</a></td>
+ </tr>
<tr>
<td><i>Users</i></td>
</tr>
@@ -126,10 +129,10 @@ document.write("</tr></table>");
<td><i>Activities</i></td>
</tr>
<tr>
- <td><li><a href="tus?op=view_activity">List Activities</a></td>
+ <td><li><a href="tus?op=view_activity_admin">List Activities</a></td>
</tr>
<tr>
- <td><li><a href="tus?op=search_activity">Search Activities</a></td>
+ <td><li><a href="tus?op=search_activity_admin">Search Activities</a></td>
</tr>
</table>
<HR NOSHADE SIZE=1>
diff --git a/pki/dogtag/tps-ui/shared/docroot/tokendb/editAdminResults.template b/pki/dogtag/tps-ui/shared/docroot/tokendb/searchActivityAdmin.template
index 91d39babc..f503595ab 100644
--- a/pki/dogtag/tps-ui/shared/docroot/tokendb/editAdminResults.template
+++ b/pki/dogtag/tps-ui/shared/docroot/tokendb/searchActivityAdmin.template
@@ -45,32 +45,76 @@
<SCRIPT type="text/JavaScript">
<!--
-var uri = "";
+var uri0 = "";
if (typeof(uriBase) == "undefined") {
- uri += "/tus";
+ uri0 += "/tus";
} else {
- uri += uriBase;
+ uri0 += uriBase;
}
document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"+1\">"+
- "<a href=\""+uri+"\">Main Menu</a></font>\n");
+ "<a href=\""+uri0+"\">Main Menu</a> : Administrator Operations : Search Activity</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");
-if (typeof(tid) == "undefined") {
- document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">\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(editType + " record "+tid+" has been updated.</font>\n");
- document.write("<BR>\n<HR NOSHADE SIZE=1>\n");
+function doFind(form) {
+ var uri = "";
+ if (typeof(uriBase) == "undefined") {
+ uri += "/tus"
+ } else {
+ uri += uriBase;
+ }
+ uri += "?op=view_activity_admin";
+ 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;
}
-
//-->
</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">
+ Token ID:
+ </font>
+ </td>
+ <td>
+ <input TYPE=TEXT NAME=tid SIZE=20>
+ </td>
+ </tr>
+ <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">
+ 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/searchActivityAdminResults.template b/pki/dogtag/tps-ui/shared/docroot/tokendb/searchActivityAdminResults.template
new file mode 100644
index 000000000..0135759ed
--- /dev/null
+++ b/pki/dogtag/tps-ui/shared/docroot/tokendb/searchActivityAdminResults.template
@@ -0,0 +1,195 @@
+<!-- --- 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">
+<!--
+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 Activity Results</font>\n");
+uri += "?op=show_admin&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");
+
+if (typeof(results) == "undefined" || results.length == 0) {
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Token Not Found</font>\n");
+} else {
+ document.write("<BR>");
+ document.write("<table BORDER=0 CELLSPACING=2 CELLPADDING=0 width=100%>\n");
+ document.write("<tr bgcolor=#cccccc>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Activity ID</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Token</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "IP</font>\n");
+ document.write("</td>\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\">"+
+ "Operation</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Result</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Created</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+ document.write("<tr bgcolor=#cccccc>\n");
+ document.write("<td colspan=7>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">");
+ document.write("Details");
+ document.write("</font>");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ for (var i = 0; i < results.length; i++) {
+ if (i % 2 == 0) {
+ document.write("<tr bgcolor='#eeeeee'>\n");
+ } else {
+ document.write("<tr >\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\"><a href=\"" + uri +
+ results[i].tokenID+"\">" + results[i].tokenID + "</a></font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[i].tokenIP+"</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[i].tokenUserID+"</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[i].tokenOp+"</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[i].tokenResult+"</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ checkDate(results[i].dateOfCreate)+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+ if (i % 2 == 0) {
+ document.write("<tr bgcolor='#eeeeee'>\n");
+ } else {
+ document.write("<tr >\n");
+ }
+ document.write("<td colspan=7>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+ results[i].tokenMsg+"</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/showAdmin.template b/pki/dogtag/tps-ui/shared/docroot/tokendb/showAdmin.template
index 04a61b1a7..d50dd6b0e 100644
--- a/pki/dogtag/tps-ui/shared/docroot/tokendb/showAdmin.template
+++ b/pki/dogtag/tps-ui/shared/docroot/tokendb/showAdmin.template
@@ -286,10 +286,7 @@ if (typeof(results) == "undefined" || results.length == 0) {
document.write("<table BORDER=0 CELLSPACING=2 CELLPADDING=0>\n");
document.write("<tr>\n");
document.write("<td>\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>");
- document.write("</td>\n");
- document.write("<td>\n");
- document.write("<form method='get' action='tus'><input type=hidden name=op value=edit_admin><input type=hidden name=tid value=" + results[0].cn + "><input TYPE=submit VALUE=Edit></form>");
+ document.write("<form method='get' action='tus'><input type=hidden name=op value=view_activity_admin><input type=hidden name=tid value=" + results[0].cn + "><input TYPE=submit VALUE=\"Show Activities\"></form>");
document.write("</td>\n");
document.write("<td>\n");
document.write("<form method='get' action='tus'><input type=hidden name=op value=confirm><input type=hidden name=tid value=" + results[0].cn + "><input TYPE=submit VALUE=Delete></form>");
diff --git a/pki/dogtag/tps/pki-tps.spec b/pki/dogtag/tps/pki-tps.spec
index 1a612dd07..202d5da1b 100644
--- a/pki/dogtag/tps/pki-tps.spec
+++ b/pki/dogtag/tps/pki-tps.spec
@@ -34,7 +34,7 @@
## Package Header Definitions
%define base_name %{base_prefix}-%{base_component}
%define base_version 1.0.0
-%define base_release 26
+%define base_release 27
%define base_group System Environment/Daemons
%define base_vendor Red Hat, Inc.
%define base_license LGPLv2 with exceptions
@@ -308,6 +308,8 @@ fi
###############################################################################
%changelog
+* Thur Feb 26 2009 Ade Lee <alee@redhat.com> 1.0.0-27
+- Bugzilla Bug 484275 and 483304: TPS roles defined and correcting error templates
* Thu Feb 26 2009 Matthew Harmsen <mharmsen@redhat.com> 1.0.0-26
- Bugzilla Bug #458337 - Provide separate listening ports for CS
* Wed Feb 25 2009 Jack Magne <jmagne@redhat.com> 1.0.0-25