Attribute cleanup and optimisation in preparation to support attribute tags, HomeController return casting

This commit is contained in:
2025-03-13 23:23:56 +11:00
parent 1ddb58ebbb
commit b01f7d5baf
12 changed files with 77 additions and 103 deletions

View File

@@ -7,6 +7,6 @@ use App\Classes\LDAP\Attribute;
/**
* Represents an attribute whose values are binary
*/
class Binary extends Attribute
abstract class Binary extends Attribute
{
}

View File

@@ -11,7 +11,7 @@ use App\Classes\LDAP\Attribute;
*/
abstract class Internal extends Attribute
{
protected bool $is_internal = TRUE;
protected(set) bool $is_internal = TRUE;
public function render(bool $edit=FALSE,bool $old=FALSE,bool $new=FALSE): View
{

View File

@@ -26,7 +26,7 @@ final class KrbPrincipalKey extends Attribute
public function render_item_old(int $key): ?string
{
$pw = Arr::get($this->oldValues,$key);
$pw = Arr::get($this->values_old,$key);
return $pw
? str_repeat('*',16)
: NULL;

View File

@@ -11,7 +11,7 @@ use Illuminate\Support\Collection;
* Represents an attribute whose value is a Kerberos Ticket Flag
* See RFC4120
*/
class KrbTicketFlags extends Attribute
final class KrbTicketFlags extends Attribute
{
private const DISALLOW_POSTDATED = 0x00000001;
private const DISALLOW_FORWARDABLE = 0x00000002;

View File

@@ -87,7 +87,7 @@ final class Password extends Attribute
public function render_item_old(int $key): ?string
{
$pw = Arr::get($this->oldValues,$key);
$pw = Arr::get($this->values_old,$key);
return $pw
? (((($x=$this->hash($pw)) && ($x::id() !== '*clear*')) ? sprintf('{%s}',$x::shortid()) : '').str_repeat('*',16))
: NULL;