mirror of
https://github.com/LinkStackOrg/LinkStack.git
synced 2025-02-08 08:08:42 +01:00
Prevent users from impersonating themselves
This commit is contained in:
parent
c771323aba
commit
077c057b32
@ -120,7 +120,7 @@
|
||||
</span>
|
||||
</a>
|
||||
@php $adminUser = User::whereNotNull('auth_as')->where('role', 'admin')->first(); @endphp
|
||||
<a class="btn btn-sm btn-icon btn-primary" style="@if(!$adminUser) background:#3a57e8;border-color:#3a57e8; @else background:#6c757d;border-color:#6c757d; @endif" data-bs-toggle="tooltip" data-bs-placement="top" data-original-title="{{__('messages.tt.Impersonate')}}" @if(!$adminUser) href="{{ route('authAsID', $user->id ) }}" @endif aria-label="Impersonate" data-bs-original-title="Impersonate">
|
||||
<a class="btn btn-sm btn-icon btn-primary" style="@if(!$adminUser && Auth::user()->id !== $user->id) background:#3a57e8;border-color:#3a57e8; @else background:#6c757d;border-color:#6c757d; @endif" data-bs-toggle="tooltip" data-bs-placement="top" data-original-title="{{__('messages.tt.Impersonate')}}" @if(!$adminUser && Auth::user()->id !== $user->id) href="{{ route('authAsID', $user->id ) }}" @endif aria-label="Impersonate" data-bs-original-title="Impersonate">
|
||||
<span class="btn-inner">
|
||||
<svg class="icon-20" width="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M9.59151 15.2068C13.2805 15.2068 16.4335 15.7658 16.4335 17.9988C16.4335 20.2318 13.3015 20.8068 9.59151 20.8068C5.90151 20.8068 2.74951 20.2528 2.74951 18.0188C2.74951 15.7848 5.88051 15.2068 9.59151 15.2068Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
|
Loading…
x
Reference in New Issue
Block a user