Show whether device is enabled and/or 2FA is active

This commit is contained in:
snipe 2016-10-31 17:16:26 -07:00
parent cbfcf959f9
commit a4ae3b0091
3 changed files with 10 additions and 4 deletions

View file

@ -920,7 +920,8 @@ class UsersController extends Controller
$allowed_columns =
[
'last_name','first_name','email','jobtitle','username','employee_num',
'assets','accessories', 'consumables','licenses','groups','activated','created_at','two_factor_enrolled'
'assets','accessories', 'consumables','licenses','groups','activated','created_at',
'two_factor_enrolled','two_factor_optin'
];
$sort = in_array($sort, $allowed_columns) ? $sort : 'first_name';
@ -995,9 +996,10 @@ class UsersController extends Controller
'consumables' => $user->consumables->count(),
'groups' => $group_names,
'notes' => e($user->notes),
'two_factor_enrolled' => ($user->two_factor_enrolled=='1') ? '<i class="fa fa-check"></i>' : '<i class="fa fa-times"></i>',
'two_factor_enrolled' => ($user->two_factor_enrolled=='1') ? '<i class="fa fa-check text-success"></i>' : '<i class="fa fa-times text-danger"></i>',
'two_factor_optin' => (($user->two_factor_optin=='1') || (Setting::getSettings()->two_factor_enabled=='2') ) ? '<i class="fa fa-check text-success"></i>' : '<i class="fa fa-times text-danger"></i>',
'created_at' => ($user->created_at!='') ? e($user->created_at->format('F j, Y h:iA')) : '',
'activated' => ($user->activated=='1') ? '<i class="fa fa-check"></i>' : '<i class="fa fa-times"></i>',
'activated' => ($user->activated=='1') ? '<i class="fa fa-check text-success"></i>' : '<i class="fa fa-times text-danger"></i>',
'actions' => ($actions) ? $actions : '',
'companyName' => is_null($user->company) ? '' : e($user->company->name)
);

View file

@ -16,4 +16,6 @@ return array(
'view_user' => 'View User :name',
'usercsv' => 'CSV file',
'two_factor_admin_optin_help' => 'Your current admin settings allow selective enforcement of two-factor authentication. ',
'two_factor_enrolled' => '2FA Device Enrolled ',
'two_factor_active' => '2FA Active ',
);

View file

@ -108,7 +108,9 @@
</th>
<th data-sortable="false" data-field="groups">{{ trans('general.groups') }}</th>
<th data-sortable="true" data-field="notes">{{ trans('general.notes') }}</th>
<th data-sortable="true" data-field="two_factor_enrolled" data-visible="false">{{ trans('admin/settings/general.two_factor') }}</th>
<th data-sortable="true" data-field="two_factor_enrolled" data-visible="false">{{ trans('admin/users/general.two_factor_enrolled') }}</th>
<th data-sortable="true" data-field="two_factor_optin" data-visible="false">{{ trans('admin/users/general.two_factor_active') }}</th>
<th data-sortable="true" data-field="activated">{{ trans('general.activated') }}</th>
<th data-sortable="true" data-field="created_at" data-searchable="true" data-visible="false">{{ trans('general.created_at') }}</th>
<th data-switchable="false" data-searchable="false" data-sortable="false" data-field="actions" >{{ trans('table.actions') }}</th>