Enable packet passwords to be optional, configured by the admin in setup
This commit is contained in:
@@ -75,6 +75,9 @@ class Setup extends Model
|
||||
case 'msgs_pkt':
|
||||
return Arr::get($this->options,$key,self::MAX_MSGS_PKT);
|
||||
|
||||
case 'pkt_passwds':
|
||||
return Arr::get($this->options,$key,TRUE);
|
||||
|
||||
default:
|
||||
return parent::__get($key);
|
||||
}
|
||||
|
@@ -190,6 +190,11 @@ class System extends Model
|
||||
return $val ?: Setup::findOrFail(config('app.id'))->batch_files;
|
||||
}
|
||||
|
||||
public function getPktPasswdsAttribute(?int $val): bool
|
||||
{
|
||||
return $val ?: Setup::findOrFail(config('app.id'))->pkt_passwds;
|
||||
}
|
||||
|
||||
public function getIsOwnedAttribute(): bool
|
||||
{
|
||||
return $this->users->count();
|
||||
|
Reference in New Issue
Block a user