Handle no attribute tags at an Attribute::class level, added form/disabled components

This commit is contained in:
2025-03-16 19:29:08 +11:00
parent 1470170928
commit 81e0e58650
22 changed files with 113 additions and 79 deletions

View File

@@ -12,6 +12,8 @@ use App\Classes\LDAP\Attribute;
*/
final class ObjectClass extends Attribute
{
protected(set) bool $no_attr_tags = TRUE;
// The schema ObjectClasses for this objectclass of a DN
protected Collection $oc_schema;
@@ -21,7 +23,7 @@ final class ObjectClass extends Attribute
* @param string $dn DN this attribute is used in
* @param string $name Name of the attribute
* @param array $values Current Values
* @param array $oc The objectclasses that the DN of this attribute has
* @param array $oc The objectclasses that the DN of this attribute has (ignored for objectclasses)
*/
public function __construct(string $dn,string $name,array $values,array $oc=[])
{
@@ -29,7 +31,7 @@ final class ObjectClass extends Attribute
$this->oc_schema = config('server')
->schema('objectclasses')
->filter(fn($item)=>$this->values->merge($this->values_old)->unique()->contains($item->name));
->filter(fn($item)=>$this->values_old->contains($item->name));
}
public function __get(string $key): mixed