chg: [log] Add link to Role

pull/6914/head
Jakub Onderka 2021-02-11 13:51:07 +01:00
parent 2369cf23cb
commit 368748fafe
3 changed files with 5 additions and 4 deletions

View File

@ -491,7 +491,7 @@ class AuditLogsController extends AppController
}
$existingObjects = [];
foreach (['User', 'Organisation', 'Galaxy', 'GalaxyCluster', 'Warninglist', 'AuthKey', 'ObjectTemplate'] as $modelName) {
foreach (['User', 'Organisation', 'Galaxy', 'GalaxyCluster', 'Warninglist', 'AuthKey', 'ObjectTemplate', 'Role'] as $modelName) {
if (isset($models[$modelName])) {
$this->loadModel($modelName);
$data = $this->{$modelName}->find('column', [
@ -510,6 +510,7 @@ class AuditLogsController extends AppController
'Organisation' => 'organisation',
'Warninglist' => 'warninglists',
'User' => 'admin/user',
'Role' => 'roles',
];
foreach ($auditLogs as $k => $auditLog) {

View File

@ -248,7 +248,7 @@
</tr>
<?php foreach ($list as $item): ?>
<tr>
<td class="short"><?= h($item['AuditLog']['created']); ?></td>
<td class="short"><?= $this->Time->time($item['AuditLog']['created']); ?></td>
<td class="short" data-search="user" data-search-value="<?= h($item['AuditLog']['user_id']) ?>"><?php
if (isset($item['AuditLog']['user_id']) && $item['AuditLog']['user_id'] == 0) {
echo __('SYSTEM');
@ -274,7 +274,7 @@
}
?>
</td>
<td class="short"><?= h($item['AuditLog']['action_human']) ?></td>
<td class="short" data-search="action" data-search-value="<?= h($item['AuditLog']['action']) ?>"><?= h($item['AuditLog']['action_human']) ?></td>
<td class="short" data-search="model" data-search-value="<?= h($item['AuditLog']['model']) . ':' . h($item['AuditLog']['model_id']) ?>">
<?php $title = isset($item['AuditLog']['event_info']) ? ' title="' . __('Event #%s: %s', $item['AuditLog']['event_id'], h($item['AuditLog']['event_info'])) . '"' : '' ?>
<?= isset($item['AuditLog']['model_link']) ? '<a href="' . h($item['AuditLog']['model_link']) . '"' . $title . '>' : '' ?>

View File

@ -23,7 +23,7 @@
</tr>
<?php foreach ($list as $item): ?>
<tr>
<td class="short"><?= h($item['AuditLog']['created']); ?></td>
<td class="short"><?= $this->Time->time($item['AuditLog']['created']); ?></td>
<td class="short"><?php
if (isset($item['AuditLog']['user_id']) && $item['AuditLog']['user_id'] == 0) {
echo __('SYSTEM');