补齐邮件协议隔离回归并优化客户端设置
Security Checks / security (push) Waiting to run

This commit is contained in:
xuans committed 2026-09-06 22:28:20 +08:00
1 parent 110a5f86cc
commit 20a6eea3b3
15 files changed
+360 -21

No files matched your search

+2 -2
View File
@@ -369,13 +369,13 @@ func ListProtocolCredentials(ctx *context.Context, w http.ResponseWriter, req *h
items, err := service.ListProtocolCredentials(ctx.UserID)
if err != nil {
log.WithError(err).Error("load protocol credentials failed")
writeSecurityError(w, response.ParamsError, "读取第三方协议设置失败")
writeSecurityError(w, response.ParamsError, "读取邮件客户端协议设置失败")
return
}
response.NewSuccessResponse(items).FPrint(w)
}
// SetProtocolCredentialEnabled 设置当前用户的第三方协议开关。
// SetProtocolCredentialEnabled 设置当前用户的邮件客户端协议开关,不改变服务监听状态。
func SetProtocolCredentialEnabled(ctx *context.Context, w http.ResponseWriter, req *http.Request) {
service, ok := requireProtocolCredentialContext(ctx, w)
if !ok {