mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-24 22:34:24 +02:00
PrivilegeAudit: Expand defined privileges when exporting to PDF
refs #4862
This commit is contained in:
parent
22cb1f2143
commit
314545f3a7
@ -186,7 +186,8 @@ class PrivilegeAudit extends BaseHtmlElement
|
|||||||
empty($refusedBy) ? (empty($grantedBy) ? null : true) : false,
|
empty($refusedBy) ? (empty($grantedBy) ? null : true) : false,
|
||||||
HtmlElement::create('details', [
|
HtmlElement::create('details', [
|
||||||
'class' => ['collapsible', 'inheritance-paths'],
|
'class' => ['collapsible', 'inheritance-paths'],
|
||||||
'data-no-persistence' => true
|
'data-no-persistence' => true,
|
||||||
|
'open' => getenv('ICINGAWEB_EXPORT_FORMAT') === 'pdf'
|
||||||
], [
|
], [
|
||||||
$header->addAttributes(['class' => 'collapsible-control']),
|
$header->addAttributes(['class' => 'collapsible-control']),
|
||||||
$rolePaths
|
$rolePaths
|
||||||
@ -303,7 +304,8 @@ class PrivilegeAudit extends BaseHtmlElement
|
|||||||
'details',
|
'details',
|
||||||
Attributes::create([
|
Attributes::create([
|
||||||
'class' => ['collapsible', 'restrictions'],
|
'class' => ['collapsible', 'restrictions'],
|
||||||
'data-no-persistence' => true
|
'data-no-persistence' => true,
|
||||||
|
'open' => getenv('ICINGAWEB_EXPORT_FORMAT') === 'pdf'
|
||||||
]),
|
]),
|
||||||
$header->addAttributes(['class' => 'collapsible-control']),
|
$header->addAttributes(['class' => 'collapsible-control']),
|
||||||
new HtmlElement('ul', null, ...$roles)
|
new HtmlElement('ul', null, ...$roles)
|
||||||
@ -323,7 +325,8 @@ class PrivilegeAudit extends BaseHtmlElement
|
|||||||
new HtmlElement(
|
new HtmlElement(
|
||||||
'details',
|
'details',
|
||||||
Attributes::create([
|
Attributes::create([
|
||||||
'class' => ['collapsible', 'privilege-section']
|
'class' => ['collapsible', 'privilege-section'],
|
||||||
|
'open' => ($wildcardState || $unrestrictedState) && getenv('ICINGAWEB_EXPORT_FORMAT') === 'pdf'
|
||||||
]),
|
]),
|
||||||
new HtmlElement(
|
new HtmlElement(
|
||||||
'summary',
|
'summary',
|
||||||
@ -448,7 +451,9 @@ class PrivilegeAudit extends BaseHtmlElement
|
|||||||
'li',
|
'li',
|
||||||
null,
|
null,
|
||||||
HtmlElement::create('details', [
|
HtmlElement::create('details', [
|
||||||
'class' => ['collapsible', 'privilege-section']
|
'class' => ['collapsible', 'privilege-section'],
|
||||||
|
'open' => ($anythingGranted || $anythingRefused || $anythingRestricted)
|
||||||
|
&& getenv('ICINGAWEB_EXPORT_FORMAT') === 'pdf'
|
||||||
], [
|
], [
|
||||||
new HtmlElement(
|
new HtmlElement(
|
||||||
'summary',
|
'summary',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user