Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pdf export for user-audit refs #4862 #4875

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
9 changes: 7 additions & 2 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"]));
moreamazingnick marked this conversation as resolved.
Show resolved Hide resolved
$this->assertPermission('config/access-control/roles');
$this->createListTabs()->activate('role/audit');
$this->view->title = t('Audit');
Expand Down Expand Up @@ -244,11 +246,14 @@ public function auditAction()
]
));

$this->addControl($header);
moreamazingnick marked this conversation as resolved.
Show resolved Hide resolved
$this->addContent(
$wrapper = Html::tag('div');
$wrapper->addHtml($header);
$wrapper->addHtml(
(new PrivilegeAudit($chosenRole !== null ? [$chosenRole] : $assignedRoles))
->addAttributes(['id' => 'role-audit'])
);

$this->addContent($wrapper);
}

public function suggestRoleMemberAction()
Expand Down