Minor schema cosmetic code fixes, more Attribute implementation from old pla, start of LDAP DN view/edit

This commit is contained in:
2023-03-02 09:54:30 +11:00
parent 491f04cd5d
commit 64d1a09db4
15 changed files with 234 additions and 99 deletions

View File

@@ -3,6 +3,7 @@
namespace App\Ldap;
use Illuminate\Support\Arr;
use Illuminate\Support\Collection;
use LdapRecord\Models\Model;
use App\Classes\LDAP\Attribute\Factory;
@@ -14,6 +15,7 @@ class Entry extends Model
public function getAttributes(): array
{
$result = collect();
foreach (parent::getAttributes() as $attribute => $value) {
$result->put($attribute,Factory::create($attribute,$value));
}
@@ -36,6 +38,13 @@ class Entry extends Model
/* METHODS */
public function getVisibleAttributes(): Collection
{
return collect($this->getAttributes())->filter(function($item) {
return ! $item->internal;
});
}
/**
* Return an icon for a DN based on objectClass
*