mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-24 05:04:07 -08:00
Added LDAP flag in users API for #8741
This commit is contained in:
parent
bec2b170ec
commit
b27aeb1952
|
@ -60,6 +60,7 @@ class UsersController extends Controller
|
|||
'users.updated_at',
|
||||
'users.username',
|
||||
'users.zip',
|
||||
'users.ldap_import',
|
||||
|
||||
])->with('manager', 'groups', 'userloc', 'company', 'department','assets','licenses','accessories','consumables')
|
||||
->withCount('assets as assets_count','licenses as licenses_count','accessories as accessories_count','consumables as consumables_count');
|
||||
|
@ -131,7 +132,7 @@ class UsersController extends Controller
|
|||
'assets','accessories', 'consumables','licenses','groups','activated','created_at',
|
||||
'two_factor_enrolled','two_factor_optin','last_login', 'assets_count', 'licenses_count',
|
||||
'consumables_count', 'accessories_count', 'phone', 'address', 'city', 'state',
|
||||
'country', 'zip', 'id'
|
||||
'country', 'zip', 'id', 'ldap_import'
|
||||
];
|
||||
|
||||
$sort = in_array($request->get('sort'), $allowed_columns) ? $request->get('sort') : 'first_name';
|
||||
|
|
|
@ -52,6 +52,7 @@ class UsersTransformer
|
|||
'notes'=> e($user->notes),
|
||||
'permissions' => $user->decodePermissions(),
|
||||
'activated' => ($user->activated =='1') ? true : false,
|
||||
'ldap_import' => ($user->ldap_import =='1') ? true : false,
|
||||
'two_factor_activated' => ($user->two_factor_active()) ? true : false,
|
||||
'two_factor_enrolled' => ($user->two_factor_active_and_enrolled()) ? true : false,
|
||||
'assets_count' => (int) $user->assets_count,
|
||||
|
|
|
@ -225,6 +225,15 @@ class UserPresenter extends Presenter
|
|||
"visible" => true,
|
||||
'formatter' => 'groupsFormatter'
|
||||
],
|
||||
[
|
||||
"field" => "ldap_import",
|
||||
"searchable" => false,
|
||||
"sortable" => true,
|
||||
"switchable" => true,
|
||||
"title" => trans('admin/settings/general.ldap_enabled'),
|
||||
"visible" => false,
|
||||
'formatter' => 'trueFalseFormatter'
|
||||
],
|
||||
[
|
||||
"field" => "two_factor_enrolled",
|
||||
"searchable" => false,
|
||||
|
|
Loading…
Reference in a new issue