This commit is mainly as a result of creating DN entries and improves some backend functions:

* Enable creation of new entries,
* Change all our ajax frames to go through /frames URI instead of /dn,
* Add our frame command to the encrypted DN,
* Automatically redirect to root URL when selecting a tree item and currently in another path (as a result of a prior POST activity),
* Some validation improvements DNExists/HasStructuralObjectClass
This commit is contained in:
2025-02-23 18:14:41 +11:00
parent f08fdb1bcd
commit 3a3e9d3c2b
27 changed files with 688 additions and 147 deletions

View File

@@ -208,7 +208,7 @@ final class ObjectClass extends Base
public function __get(string $key): mixed
{
return match ($key) {
'attributes' => $this->getAllAttrs(),
'attributes' => $this->getAllAttrs(TRUE),
'sup' => $this->sup_classes,
'type_name' => match ($this->type) {
Server::OC_STRUCTURAL => 'Structural',
@@ -223,13 +223,18 @@ final class ObjectClass extends Base
/**
* Return a list of attributes that this objectClass provides
*
* @param bool $parents
* @return Collection
* @throws InvalidUsage
*/
public function getAllAttrs(): Collection
public function getAllAttrs(bool $parents=FALSE): Collection
{
return $this->getMustAttrs()
->merge($this->getMayAttrs());
return $this->getMustAttrs($parents)
->transform(function($item) {
$item->required = true;
return $item;
})
->merge($this->getMayAttrs($parents));
}
/**