fix(email): complete mail settings and templates
This commit is contained in:
1 parent
4f8ab94fac
commit
4833053a5c
29 files changed
+716
-426
No files matched your search
@@ -34,7 +34,6 @@ class Settings {
|
||||
* 用于导入导出完整性检查。
|
||||
*/
|
||||
public const STANDALONE_OPTION_KEYS = [
|
||||
'aksrt_mail_smtp',
|
||||
'aksrt_captcha_config',
|
||||
'aksrt_moderation_config',
|
||||
'aksrt_download_config',
|
||||
@@ -55,7 +54,6 @@ class Settings {
|
||||
* 包含 secret 字段的 option key — 永不进入独立导入导出。
|
||||
*/
|
||||
public const SECRET_OPTION_KEYS = [
|
||||
'aksrt_mail_smtp',
|
||||
'aksrt_captcha_config',
|
||||
'aksrt_identity_secrets',
|
||||
];
|
||||
@@ -617,6 +615,9 @@ class Settings {
|
||||
* @return array<string,mixed>
|
||||
*/
|
||||
public static function redact_sensitive_settings(array $payload): array {
|
||||
if (isset($payload['domains']['global']['data']) && is_array($payload['domains']['global']['data'])) {
|
||||
unset($payload['domains']['global']['data']['mail_passwd']);
|
||||
}
|
||||
if (isset($payload['standalone']) && is_array($payload['standalone'])) {
|
||||
$blocked = array_merge(self::SCHEMA_MANAGED_STANDALONE_OPTION_KEYS, self::SECRET_OPTION_KEYS);
|
||||
foreach ($blocked as $option_key) {
|
||||
|
||||
Reference in new issue
Block a user