Skip to content

Commit 80e825d

Browse files
committed
Fix: 2973 Add login as link
1 parent 8ffba1c commit 80e825d

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

web/templates/pages/list_search.html

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,16 @@
143143
</div>
144144
<div class="clearfix l-unit__stat-col--left text-center"><?=translate_date($value['DATE'])?></div>
145145
<div class="clearfix l-unit__stat-col--left text-center"><b>
146-
<a href="/search/?q=<?=htmlentities($_GET['q']); ?>&u=<?=$value['USER']; ?>&token=<?=$_SESSION['token']?>"><?=$value['USER']; ?></a></b></div>
146+
<a href="/search/?q=<?=htmlentities($_GET['q']); ?>&u=<?=$value['USER']; ?>&token=<?=$_SESSION['token']?>"><?=$value['USER']; ?></a>
147+
<?php if (!($_SESSION['POLICY_SYSTEM_HIDE_ADMIN'] === 'yes' && $value['USER'] !== 'admin')){
148+
if ($_SESSION['userContext'] === 'admin'){
149+
?>
150+
<a href="/login/?loginas=<?=$value['USER']?>&token=<?=$_SESSION['token']?>" title="<?=_('login as');?> <?=$value['USER']?>"><i class="fas fa-sign-in-alt status-icon green status-icon dim icon-large"></i></a>
151+
<?php
152+
}
153+
}
154+
?>
155+
</b></div>
147156
<div class="clearfix l-unit__stat-col--left text-center"><?=_($object)?></b></div>
148157
</div>
149158
</div>

0 commit comments

Comments
 (0)