Enable user switching
This commit is contained in:
@@ -15,8 +15,15 @@
|
||||
|
||||
<ul class="float-end">
|
||||
@auth
|
||||
<li><a href="{{ url('settings') }}"><span>{{ Auth::user()->name }}</span></a></li>
|
||||
<li><a href="{{ url('logout') }}"><span>Logout</span></a></li>
|
||||
<li class="{{ Auth::user()->switched ? 'switched' : '' }}"><a href="{{ url('settings') }}"><span>{{ Auth::user()->name }}</span></a></li>
|
||||
@if(Auth::user()->switched)
|
||||
<li><a href="{{ url('admin/switch/stop') }}">
|
||||
<span>Switch Back</span>
|
||||
</a></li>
|
||||
@else
|
||||
<li><a href="{{ url('logout') }}"><span>Logout</span></a></li>
|
||||
@endif
|
||||
|
||||
@endauth
|
||||
@guest
|
||||
<li><a href="{{ url('login') }}"><span>Login</span></a></li>
|
||||
|
@@ -28,7 +28,7 @@
|
||||
<tbody>
|
||||
@foreach (\App\Models\User::orderBy('email')->cursor() as $oo)
|
||||
<tr class="{{ $oo->admin ? 'admin' : '' }}">
|
||||
<td><a href="{{ url('user/addedit',[$oo->id]) }}">{{ $oo->id }}</a></td>
|
||||
<td><a href="{{ url('user/addedit',[$oo->id]) }}">{{ $oo->id }}</a> @if(Auth::user()->admin && (Auth::id() !== $oo->id))<span class="float-end"><a href="{{ url('admin/switch/start',[$oo->id]) }}"><i class="bi bi-person-bounding-box"></i></a></span>@endif</td>
|
||||
<td>{{ $oo->email }}</td>
|
||||
<td>{{ $oo->name }}</td>
|
||||
<td>{{ $oo->active ? 'YES' : 'NO' }}</td>
|
||||
|
Reference in New Issue
Block a user