mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-25 20:51:30 -08:00
Show whether device is enabled and/or 2FA is active
This commit is contained in:
parent
cbfcf959f9
commit
a4ae3b0091
|
@ -920,7 +920,8 @@ class UsersController extends Controller
|
||||||
$allowed_columns =
|
$allowed_columns =
|
||||||
[
|
[
|
||||||
'last_name','first_name','email','jobtitle','username','employee_num',
|
'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';
|
$sort = in_array($sort, $allowed_columns) ? $sort : 'first_name';
|
||||||
|
@ -995,9 +996,10 @@ class UsersController extends Controller
|
||||||
'consumables' => $user->consumables->count(),
|
'consumables' => $user->consumables->count(),
|
||||||
'groups' => $group_names,
|
'groups' => $group_names,
|
||||||
'notes' => e($user->notes),
|
'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')) : '',
|
'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 : '',
|
'actions' => ($actions) ? $actions : '',
|
||||||
'companyName' => is_null($user->company) ? '' : e($user->company->name)
|
'companyName' => is_null($user->company) ? '' : e($user->company->name)
|
||||||
);
|
);
|
||||||
|
|
|
@ -16,4 +16,6 @@ return array(
|
||||||
'view_user' => 'View User :name',
|
'view_user' => 'View User :name',
|
||||||
'usercsv' => 'CSV file',
|
'usercsv' => 'CSV file',
|
||||||
'two_factor_admin_optin_help' => 'Your current admin settings allow selective enforcement of two-factor authentication. ',
|
'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 ',
|
||||||
);
|
);
|
||||||
|
|
|
@ -108,7 +108,9 @@
|
||||||
</th>
|
</th>
|
||||||
<th data-sortable="false" data-field="groups">{{ trans('general.groups') }}</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="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="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-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>
|
<th data-switchable="false" data-searchable="false" data-sortable="false" data-field="actions" >{{ trans('table.actions') }}</th>
|
||||||
|
|
Loading…
Reference in a new issue