Add icons for each DN based on objectClass

This commit is contained in:
Deon George
2020-09-23 22:14:38 +10:00
parent 2a099e2dc4
commit 851010d6d5
179 changed files with 598 additions and 122 deletions

View File

@@ -12,26 +12,6 @@ use App\Classes\LDAP\Server;
class APIController extends Controller
{
/**
* Get the LDAP server BASE DNs
*
* @return array|null
*/
public function bases(): Collection
{
return (new Server())
->getBaseDN()
->transform(function($item) {
return [
'title'=>$item,
'item'=>Crypt::encryptString($item),
'lazy'=>TRUE,
'icon'=>'fa-fw fas fa-sitemap',
'tooltip'=>$item,
];
});
}
/**
* @param Request $request
* @return Collection
@@ -48,7 +28,7 @@ class APIController extends Controller
return [
'title'=>$item->getRdn(),
'item'=>Crypt::encryptString($item->getDn()),
'icon'=>'fa-fw fas fa-sitemap',
'icon'=>$item->icon(),
'lazy'=>Arr::get($item->getAttribute('hassubordinates'),0) == 'TRUE',
'tooltip'=>$item->getDn(),
];