From d3ce6d814c4a158f79664c0ab64a8e8871051968 Mon Sep 17 00:00:00 2001 From: peaklabs-dev <122374094+peaklabs-dev@users.noreply.github.com> Date: Tue, 10 Dec 2024 13:45:52 +0100 Subject: [PATCH] feat: use encryption in instance settings model --- app/Models/InstanceSettings.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/app/Models/InstanceSettings.php b/app/Models/InstanceSettings.php index 7110b8cff..5b89bb401 100644 --- a/app/Models/InstanceSettings.php +++ b/app/Models/InstanceSettings.php @@ -16,7 +16,19 @@ class InstanceSettings extends Model implements SendsEmail protected $guarded = []; protected $casts = [ + 'smtp_enabled' => 'boolean', + 'smtp_from_address' => 'encrypted', + 'smtp_from_name' => 'encrypted', + 'smtp_recipients' => 'encrypted', + 'smtp_host' => 'encrypted', + 'smtp_port' => 'integer', + 'smtp_username' => 'encrypted', 'smtp_password' => 'encrypted', + 'smtp_timeout' => 'integer', + + 'resend_enabled' => 'boolean', + 'resend_api_key' => 'encrypted', + 'allowed_ip_ranges' => 'array', 'is_auto_update_enabled' => 'boolean', 'auto_update_frequency' => 'string',