Enabled adding new attributes to a DN
This commit is contained in:
@@ -97,6 +97,7 @@ class Attribute
|
||||
$this->name = $name;
|
||||
$this->values = collect($values);
|
||||
$this->lang_tags = collect();
|
||||
$this->required_by = collect();
|
||||
|
||||
// No need to load our schema for internal attributes
|
||||
if (! $this->is_internal)
|
||||
@@ -182,9 +183,10 @@ class Attribute
|
||||
* Display the attribute value
|
||||
*
|
||||
* @param bool $edit
|
||||
* @param bool $blank
|
||||
* @return View
|
||||
*/
|
||||
public function render(bool $edit=FALSE): View
|
||||
public function render(bool $edit=FALSE,bool $blank=FALSE): View
|
||||
{
|
||||
return view('components.attribute')
|
||||
->with('edit',$edit)
|
||||
|
@@ -18,10 +18,11 @@ final class JpegPhoto extends Binary
|
||||
$this->internal = FALSE;
|
||||
}
|
||||
|
||||
public function render(bool $edit=FALSE): View
|
||||
public function render(bool $edit=FALSE,bool $blank=FALSE): View
|
||||
{
|
||||
return view('components.attribute.binary.jpegphoto')
|
||||
->with('edit',$edit)
|
||||
->with('blank',$blank)
|
||||
->with('o',$this)
|
||||
->with('f',new \finfo);
|
||||
}
|
||||
|
@@ -13,7 +13,7 @@ abstract class Internal extends Attribute
|
||||
{
|
||||
protected bool $is_internal = TRUE;
|
||||
|
||||
public function render(bool $edit=FALSE): View
|
||||
public function render(bool $edit=FALSE,bool $blank=FALSE): View
|
||||
{
|
||||
// @note Internal attributes cannot be edited
|
||||
return view('components.attribute.internal')
|
||||
|
@@ -11,7 +11,7 @@ use App\Classes\LDAP\Attribute\Internal;
|
||||
*/
|
||||
final class Timestamp extends Internal
|
||||
{
|
||||
public function render(bool $edit=FALSE): View
|
||||
public function render(bool $edit=FALSE,bool $blank=FALSE): View
|
||||
{
|
||||
// @note Internal attributes cannot be edited
|
||||
return view('components.attribute.internal.timestamp')
|
||||
|
@@ -39,7 +39,7 @@ final class ObjectClass extends Attribute
|
||||
return $this->structural->search($value) !== FALSE;
|
||||
}
|
||||
|
||||
public function render(bool $edit=FALSE): View
|
||||
public function render(bool $edit=FALSE,bool $blank=FALSE): View
|
||||
{
|
||||
return view('components.attribute.objectclass')
|
||||
->with('edit',$edit)
|
||||
|
@@ -11,10 +11,11 @@ use App\Classes\LDAP\Attribute;
|
||||
*/
|
||||
final class Password extends Attribute
|
||||
{
|
||||
public function render(bool $edit=FALSE): View
|
||||
public function render(bool $edit=FALSE,bool $blank=FALSE): View
|
||||
{
|
||||
return view('components.attribute.password')
|
||||
->with('edit',$edit)
|
||||
->with('blank',$blank)
|
||||
->with('o',$this);
|
||||
}
|
||||
}
|
@@ -49,7 +49,7 @@ abstract class Schema extends Attribute
|
||||
return Arr::get(($array ? $array->get($string) : []),$key);
|
||||
}
|
||||
|
||||
public function render(bool $edit=FALSE): View
|
||||
public function render(bool $edit=FALSE,bool $blank=FALSE): View
|
||||
{
|
||||
// @note Schema attributes cannot be edited
|
||||
return view('components.attribute.internal')
|
||||
|
@@ -33,7 +33,7 @@ final class Mechanisms extends Schema
|
||||
return parent::_get(config_path('ldap_supported_saslmechanisms.txt'),$string,$key);
|
||||
}
|
||||
|
||||
public function render(bool $edit=FALSE): View
|
||||
public function render(bool $edit=FALSE,bool $blank=FALSE): View
|
||||
{
|
||||
// @note Schema attributes cannot be edited
|
||||
return view('components.attribute.schema.mechanisms')
|
||||
|
@@ -34,7 +34,7 @@ final class OID extends Schema
|
||||
return parent::_get(config_path('ldap_supported_oids.txt'),$string,$key);
|
||||
}
|
||||
|
||||
public function render(bool $edit=FALSE): View
|
||||
public function render(bool $edit=FALSE,bool $blank=FALSE): View
|
||||
{
|
||||
// @note Schema attributes cannot be edited
|
||||
return view('components.attribute.schema.oid')
|
||||
|
Reference in New Issue
Block a user