Ask for email when generating LetsEncrypt SSLs (#452)

This commit is contained in:
Saeed Vaziry
2025-01-29 21:00:43 +01:00
committed by GitHub
parent 270928af13
commit 53e20cbc2a
7 changed files with 59 additions and 5 deletions

View File

@ -20,6 +20,7 @@
* @property string $ca_path
* @property ?array $domains
* @property int $log_id
* @property string $email
* @property ?ServerLog $log
*/
class Ssl extends AbstractModel
@ -36,6 +37,7 @@ class Ssl extends AbstractModel
'status',
'domains',
'log_id',
'email',
];
protected $casts = [
@ -143,4 +145,13 @@ public function log(): BelongsTo
{
return $this->belongsTo(ServerLog::class);
}
public function getEmailAttribute(?string $value): string
{
if ($value) {
return $value;
}
return $this->site->server->creator->email;
}
}