Display if subusers are using 2FA

This commit is contained in:
Dane Everitt 2017-01-22 16:16:26 -05:00
parent edd26893a5
commit 9e54dabe5b
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
3 changed files with 10 additions and 1 deletions

View file

@ -62,7 +62,7 @@ class SubuserController extends Controller
return view('server.users.index', [
'server' => $server,
'node' => $node,
'subusers' => Models\Subuser::select('subusers.*', 'users.email', 'users.username')
'subusers' => Models\Subuser::select('subusers.*', 'users.email', 'users.username', 'users.use_totp')
->join('users', 'users.id', '=', 'subusers.user_id')
->where('server_id', $server->id)
->get(),

View file

@ -59,4 +59,5 @@ return [
'yes' => 'Yes',
'no' => 'No',
'delete' => 'Delete',
'2fa' => '2FA',
];

View file

@ -46,6 +46,7 @@
<th></th>
<th>@lang('strings.username')</th>
<th>@lang('strings.email')</th>
<th class="text-center">@lang('strings.2fa')</th>
<th class="hidden-xs">@lang('strings.created_at')</th>
@can('view-subuser', $server)<th></th>@endcan
@can('delete-subuser', $server)<th></th>@endcan
@ -55,6 +56,13 @@
<td class="text-center middle"><img class="img-circle" src="https://www.gravatar.com/avatar/{{ md5($user->email) }}?s=128" style="height:20px;" alt="User Image"></td>
<td class="middle">{{ $user->username }}
<td class="middle"><code>{{ $user->email }}</code></td>
<td class="middle text-center">
@if($user->use_totp)
<i class="fa fa-lock text-green"></i>
@else
<i class="fa fa-unlock text-red"></i>
@endif
</td>
<td class="middle hidden-xs">{{ $user->created_at }}</td>
@can('view-subuser', $server)
<td class="text-center middle">