Skip to content

Commit

Permalink
ltb-project#128: Changed Action and Result to readable messages. Adde…
Browse files Browse the repository at this point in the history
…d link to User. Trimmed CN to only display user.
  • Loading branch information
abpai94 committed Jul 30, 2024
1 parent c720437 commit fd510cf
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 12 deletions.
4 changes: 2 additions & 2 deletions conf/config.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,9 @@
$audit_log_items = array('date','ip','dn','done_by','action','result','comment');
$audit_log_title = "date";
$audit_log_sortby = "date";
$audit_log_linkto = array("user_dn");
$audit_log_linkto = array("dn");
$audit_log_show_undefined = true;
$audit_log_truncate_value_after = 50;
$audit_log_truncate_value_after = 10;
#$header_name_audit_admin = "AUTH_USER";

# Debug mode
Expand Down
1 change: 0 additions & 1 deletion htdocs/auditlog.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
require_once("../lib/audit.inc.php");

#TODO: Order based on newest to oldest
#TODO: Highlight user with Name and link rather than full CN
#TODO: Test comments and results to appear correctly

$entries = array();
Expand Down
16 changes: 7 additions & 9 deletions lang/en.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,25 @@
$messages['pager_all'] = "All";
$messages['print_all'] = "Print all results";
$messages['print_page'] = "Print this page";
$messages['label_action'] = "Action";
$messages['label_authtimestamp'] = "Last authentication";
$messages['label_businesscategory'] = "Business category";
$messages['label_carlicense'] = "Car license";
$messages['label_comment'] = "Comment";
$messages["label_created"] = "Created";
$messages['label_date'] = "Date";
$messages['label_description'] = "Description";
$messages['label_displayname'] = "Display name";
$messages['label_dn'] = "User";
$messages['label_done_by'] = "Done By";
$messages['label_employeenumber'] = "Employee number";
$messages['label_employeetype'] = "Employee type";
$messages['label_expirationdate'] = "Expiration date";
$messages['label_fax'] = "Fax";
$messages['label_firstname'] = "First name";
$messages['label_fullname'] = "Full name";
$messages['label_identifier'] = "Identifier";
$messages['label_ip'] = "IP Address";
$messages['label_l'] = "Locality";
$messages['label_lastname'] = "Last name";
$messages['label_mail'] = "Mail";
Expand All @@ -65,19 +71,11 @@
$messages['label_pwdfailuretime'] = "Last authentication failures";
$messages['label_pwdpolicysubentry'] = "Associated password policy";
$messages['label_pwdreset'] = "Reset password at next connection";
$messages['label_result'] = "Result";
$messages['label_secretary'] = "Secretary";
$messages['label_state'] = "State";
$messages['label_street'] = "Street";
$messages['label_title'] = "Title";

$messages['label_date'] = "Date";
$messages['label_ip'] = "IP Address";
$messages['label_dn'] = "User";
$messages['label_done_by'] = "Done By";
$messages['label_action'] = "Action";
$messages['label_result'] = "Result";
$messages['label_comment'] = "Comment";

$messages['ldaperror'] = "LDAP communication error";
$messages['lockaccount'] = "Lock account";
$messages['lockedaccounts'] = "Locked accounts";
Expand Down
7 changes: 7 additions & 0 deletions templates/listing_table.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,15 @@
{/if}
{/if}
{if $display == "audit"}
{if $column == "result" or $column == "action"}
{$msg_{$entry.$column}}
{elseif $column == "dn"}
<a href="index.php?page=display&dn={$entry.dn|escape:'url'}&search={$search}" title="{$msg_displayentry}"\>
{{$entry.$column|regex_replace:"/(cn=)/":""}|regex_replace:"/(,ou=.*)/":""}
{else}
{$entry.$column}
{/if}
{/if}
</td>
{/foreach}
</tr>
Expand Down

0 comments on commit fd510cf

Please sign in to comment.