feat: sync deployed v1.0.0-rc.38-custom.42
Sync production source including routing, billing, Astra detection and public uptime. Update custom build instructions and license packaging.
This commit is contained in:
1 parent
aa6c3f50f4
commit
ceddfd3d6b
828 files changed
+122253
-13702
No files matched your search
+11
-4
@@ -96,7 +96,7 @@ func Login(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
setupLogin(&user, c)
|
||||
setupLogin(&user, nil, c)
|
||||
}
|
||||
|
||||
// loginMethodFromContext 根据请求路径推导登录方式,用于登录审计日志。
|
||||
@@ -144,9 +144,11 @@ func recordLoginAudit(user *model.User, c *gin.Context) {
|
||||
}
|
||||
|
||||
// setupLogin evaluates the shared login policy after primary authentication.
|
||||
// Only a completed Passkey ceremony may go directly to session issuance.
|
||||
func setupLogin(user *model.User, c *gin.Context) {
|
||||
challenge, err := service.StartLoginVerification(user, loginMethodFromContext(c))
|
||||
// Only a completed Passkey ceremony may go directly to session issuance. A
|
||||
// pending legacy GitHub binding rewrite travels inside the challenge and is
|
||||
// written only when the verification completes.
|
||||
func setupLogin(user *model.User, migration *service.LegacyGitHubMigration, c *gin.Context) {
|
||||
challenge, err := service.StartLoginVerification(user, loginMethodFromContext(c), migration)
|
||||
if err != nil {
|
||||
writeSecurityOperationError(c, err)
|
||||
return
|
||||
@@ -1278,6 +1280,7 @@ type UpdateUserSettingRequest struct {
|
||||
UpstreamModelUpdateNotifyEnabled *bool `json:"upstream_model_update_notify_enabled,omitempty"`
|
||||
AcceptUnsetModelRatioModel bool `json:"accept_unset_model_ratio_model"`
|
||||
RecordIpLog bool `json:"record_ip_log"`
|
||||
AstraCostNoticeAck *bool `json:"astra_cost_notice_ack,omitempty"`
|
||||
}
|
||||
|
||||
func UpdateUserSetting(c *gin.Context) {
|
||||
@@ -1380,6 +1383,10 @@ func UpdateUserSetting(c *gin.Context) {
|
||||
UpstreamModelUpdateNotifyEnabled: upstreamModelUpdateNotifyEnabled,
|
||||
AcceptUnsetRatioModel: req.AcceptUnsetModelRatioModel,
|
||||
RecordIpLog: req.RecordIpLog,
|
||||
AstraCostNoticeAck: existingSettings.AstraCostNoticeAck,
|
||||
}
|
||||
if req.AstraCostNoticeAck != nil {
|
||||
settings.AstraCostNoticeAck = *req.AstraCostNoticeAck
|
||||
}
|
||||
|
||||
// 如果是webhook类型,添加webhook相关设置
|
||||
|
||||
Reference in new issue
Block a user