Add configuration option for public evidence accessibility
This commit is contained in:
parent
eeb22bf3a5
commit
dd71f06434
2 changed files with 13 additions and 0 deletions
|
@ -34,6 +34,7 @@
|
||||||
self::$configuration->setDefault('server.list_blacklist_max_items', 100);
|
self::$configuration->setDefault('server.list_blacklist_max_items', 100);
|
||||||
self::$configuration->setDefault('server.public_audit_logs', true);
|
self::$configuration->setDefault('server.public_audit_logs', true);
|
||||||
self::$configuration->setDefault('server.public_audit_entries', array_map(fn($type) => $type->value, AuditLogType::cases()));
|
self::$configuration->setDefault('server.public_audit_entries', array_map(fn($type) => $type->value, AuditLogType::cases()));
|
||||||
|
self::$configuration->setDefault('server.public_evidence', true);
|
||||||
|
|
||||||
self::$configuration->setDefault('database.host', '127.0.0.1');
|
self::$configuration->setDefault('database.host', '127.0.0.1');
|
||||||
self::$configuration->setDefault('database.port', 3306);
|
self::$configuration->setDefault('database.port', 3306);
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
* @var AuditLogType[]
|
* @var AuditLogType[]
|
||||||
*/
|
*/
|
||||||
private array $publicAuditEntries;
|
private array $publicAuditEntries;
|
||||||
|
private bool $publicEvidence;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ServerConfiguration constructor.
|
* ServerConfiguration constructor.
|
||||||
|
@ -41,6 +42,7 @@
|
||||||
$this->listBlacklistMaxItems = $config['list_blacklist_max_items'] ?? 100;
|
$this->listBlacklistMaxItems = $config['list_blacklist_max_items'] ?? 100;
|
||||||
$this->publicAuditLogs = $config['public_audit_logs'] ?? true;
|
$this->publicAuditLogs = $config['public_audit_logs'] ?? true;
|
||||||
$this->publicAuditEntries = array_map(fn($type) => AuditLogType::from($type), $config['public_audit_entries'] ?? []);
|
$this->publicAuditEntries = array_map(fn($type) => AuditLogType::from($type), $config['public_audit_entries'] ?? []);
|
||||||
|
$this->publicEvidence = $config['public_evidence'] ?? true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -162,4 +164,14 @@
|
||||||
{
|
{
|
||||||
return $this->publicAuditEntries;
|
return $this->publicAuditEntries;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if evidence is publicly accessible.
|
||||||
|
*
|
||||||
|
* @return bool True if public evidence is enabled, false otherwise.
|
||||||
|
*/
|
||||||
|
public function isPublicEvidence(): bool
|
||||||
|
{
|
||||||
|
return $this->publicEvidence;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue