Skip to content

Commit

Permalink
Add pdf export for user-audit refs Icinga#4862
Browse files Browse the repository at this point in the history
  • Loading branch information
moreamazingnick authored Jul 12, 2022
1 parent ff55139 commit 9107e8f
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions application/controllers/RoleController.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
use Icinga\Web\Controller\AuthBackendController;
use Icinga\Web\View\PrivilegeAudit;
use Icinga\Web\Widget\SingleValueSearchControl;
use Icinga\Web\Widget\Tabextension\OutputFormat;
use ipl\Html\Html;
use ipl\Html\HtmlString;
use ipl\Web\Url;
Expand Down Expand Up @@ -143,6 +144,7 @@ public function removeAction()

public function auditAction()
{
$this->getTabs()->extend(new OutputFormat(["csv","json"]));
$this->assertPermission('config/access-control/roles');
$this->createListTabs()->activate('role/audit');
$this->view->title = t('Audit');
Expand Down Expand Up @@ -244,11 +246,13 @@ public function auditAction()
]
));

$this->addControl($header);
$this->addContent(
$wrapper = Html::tag('div');
$wrapper->addHtml($header);
$wrapper->addHtml(
(new PrivilegeAudit($chosenRole !== null ? [$chosenRole] : $assignedRoles))
->addAttributes(['id' => 'role-audit'])
);
->addAttributes(['id' => 'role-audit']));

$this->addContent($wrapper);
}

public function suggestRoleMemberAction()
Expand Down

0 comments on commit 9107e8f

Please sign in to comment.