LSaddon::accesslog: show events author

This commit is contained in:
Benjamin Renard 2022-07-20 14:56:16 +02:00
parent 75258d9744
commit e23ee2f209
5 changed files with 3573 additions and 3553 deletions

View file

@ -64,6 +64,12 @@ function mapAccessLogEntry(&$entry) {
$attrs = $entry['attrs'];
$entry['start'] = LSldap::parseDate(LSldap::getAttr($attrs, 'reqStart'));
$entry['end'] = LSldap::parseDate(LSldap::getAttr($attrs, 'reqEnd'));
$entry['author_dn'] = LSldap::getAttr($attrs, 'reqAuthzID');
$entry['author_rdn'] = (
$entry['author_dn']?
explode('=', explode(',', $entry['author_dn'])[0])[1]:
null
);
$entry['type'] = LSldap::getAttr($attrs, 'reqType');
$entry['result'] = ldap_err2str(LSldap::getAttr($attrs, 'reqResult'));
$entry['message'] = LSldap::getAttr($attrs, 'reqMessage');
@ -112,6 +118,7 @@ function getEntryAccessLog($dn) {
'attributes' => array(
'reqStart',
'reqEnd',
'reqAuthzID',
'reqType',
'reqResult',
'reqMessage',

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -7,6 +7,7 @@
<thead>
<tr>
<th>{tr msg="Date"}</th>
<th>{tr msg="Author"}</th>
<th>{tr msg="Operation"}</th>
<th>{tr msg="Result"}</th>
<th>{tr msg="Details"}</th>
@ -16,6 +17,7 @@
{foreach $page.logs as $log}
<tr>
<td>{$log.start->format('Y/m/d H:i:s')}</td>
<td class="center">{if $log.author_dn}<span title='{$log.author_dn|escape:quotes}' class='LStips'>{$log.author_rdn}</span>{/if}</td>
<td class="center">{$log.type}</td>
<td class="center">{$log.result}{if $log.message} <img class='LStips' src="{img name='help'}" alt="?" title='{$log.message|escape:quotes}'/>{/if}</td>
<td>