PrivilegeAudit: Show missing initiators in inheritance paths

This commit is contained in:
Johannes Meyer 2021-04-06 16:10:21 +02:00
parent b5334a063e
commit 314ec5256c
1 changed files with 2 additions and 7 deletions

View File

@ -112,7 +112,6 @@ class PrivilegeAudit extends BaseHtmlElement
$path = new HtmlElement('ol');
$class = null;
$initiator = null;
$setInitiator = false;
foreach ($rolesReversed as $role) {
$granted = false;
@ -136,7 +135,7 @@ class PrivilegeAudit extends BaseHtmlElement
$connector = new HtmlElement('li', ['class' => ['connector', $class]]);
if ($setInitiator) {
$setInitiator = false;
$initiator = $connector;
$connector->getAttributes()->add('class', 'initiator');
}
$path->prepend($connector);
@ -156,10 +155,6 @@ class PrivilegeAudit extends BaseHtmlElement
}
}
if ($initiator !== null) {
$initiator->getAttributes()->add('class', 'initiator');
}
if ($vClass === null || $vClass === 'granted') {
$vClass = $class;
}
@ -169,7 +164,7 @@ class PrivilegeAudit extends BaseHtmlElement
new HtmlElement('li', ['class' => [
'connector',
$class,
$initiator === null ? 'initiator' : null
$setInitiator ? 'initiator' : null
]])
]));
}