only show link to customer when user is admin in Domain::domainWithCustomerLink callback
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -36,6 +36,7 @@ class Domain
|
|||||||
{
|
{
|
||||||
$linker = UI::getLinker();
|
$linker = UI::getLinker();
|
||||||
$result = '<a href="https://' . $attributes['data'] . '" target="_blank">' . $attributes['data'] . '</a>';
|
$result = '<a href="https://' . $attributes['data'] . '" target="_blank">' . $attributes['data'] . '</a>';
|
||||||
|
if ((int)UI::getCurrentUser()['adminsession'] == 1) {
|
||||||
$result .= ' (<a href="' . $linker->getLink([
|
$result .= ' (<a href="' . $linker->getLink([
|
||||||
'section' => 'customers',
|
'section' => 'customers',
|
||||||
'page' => 'customers',
|
'page' => 'customers',
|
||||||
@@ -43,6 +44,7 @@ class Domain
|
|||||||
'sort' => $attributes['fields']['loginname'],
|
'sort' => $attributes['fields']['loginname'],
|
||||||
'id' => $attributes['fields']['customerid'],
|
'id' => $attributes['fields']['customerid'],
|
||||||
]) . '">' . $attributes['fields']['loginname'] . '</a>)';
|
]) . '">' . $attributes['fields']['loginname'] . '</a>)';
|
||||||
|
}
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user