Start of tree being rendered by API/AJAX calls

This commit is contained in:
Deon George
2020-08-27 22:46:07 +10:00
parent 1e3e4b2196
commit de4fa04d3b
21 changed files with 2150 additions and 862 deletions

View File

@@ -0,0 +1,30 @@
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Crypt;
use App\Classes\LDAP\Server;
class APIController extends Controller
{
/**
* Get the LDAP server BASE DNs
*
* @return array|null
*/
public function bases()
{
return (new Server())->getBaseDN()->transform(function($item) {
return [
'title'=>$item,
'item'=>base64_encode(Crypt::encryptString($item)),
//'folder'=>TRUE,
'lazy'=>TRUE,
//'key'=>0,
//'autoexpand'=>TRUE,
];
});
}
}

View File

@@ -50,4 +50,14 @@ class LoginController extends Controller
return view('adminlte::auth.login')->with('login_note',$login_note);
}
/**
* Get the login username to be used by the controller.
*
* @return string
*/
public function username()
{
return config('ldap_auth.identifiers.ldap.locate_users_by');
}
}