Admin: show the login as button only with certain rights

This commit is contained in:
Ilya Prokopenko 2021-09-11 23:11:06 +07:00
parent 8369857e17
commit b66bac7746
No known key found for this signature in database
GPG key ID: 7736BBBB05F14A56

View file

@ -49,9 +49,11 @@
<a class="aui-button aui-button-primary" href="/admin/users/id{$user->getId()}">
<span class="aui-icon aui-icon-small aui-iconfont-new-edit">Редактировать</span>
</a>
{if $thisUser->getChandlerUser()->can("substitute")->model('openvk\Web\Models\Entities\User')->whichBelongsTo(0)}
<a class="aui-button" href="/setSID/{$user->getChandlerUser()->getId()}?hash={rawurlencode($csrfToken)}">
<span class="aui-icon aui-icon-small aui-iconfont-sign-in">Войти как</span>
</a>
{/if}
</td>
</tr>
</tbody>