Fix showing required attributes when required by a parent class of the entries objectclasses

This commit is contained in:
Deon George 2025-05-24 00:23:22 +10:00
parent 181971acc4
commit 4e991db8b1

View File

@ -106,11 +106,17 @@ class Attribute implements \Countable, \ArrayAccess
$this->_values = collect($values);
$this->_values_old = collect($values);
$this->oc = collect($oc);
$this->schema = (new Server)
$this->schema = config('server')
->schema('attributetypes',$name);
$this->oc = collect();
// Get the objectclass heirarchy for required attribute determination
foreach ($oc as $objectclass) {
$this->oc->push($objectclass);
$this->oc = $this->oc->merge(config('server')->schema('objectclasses',$objectclass)->getParents()->pluck('name'));
}
/*
# Should this attribute be hidden
if ($server->isAttrHidden($this->name))