1. add LINUX DO oauth

2. fix oauth reg aff issue

Signed-off-by: wozulong <>
This commit is contained in:
wozulong
2024-03-14 18:53:06 +08:00
parent 299911d4cd
commit 7ddb7c586d
19 changed files with 494 additions and 10 deletions

View File

@@ -50,6 +50,14 @@ func UpdateOption(c *gin.Context) {
})
return
}
case "LinuxDoOAuthEnabled":
if option.Value == "true" && common.LinuxDoClientId == "" {
c.JSON(http.StatusOK, gin.H{
"success": false,
"message": "无法启用 LINUX DO OAuth请先填入 LINUX DO Client Id 以及 LINUX DO Client Secret",
})
return
}
case "EmailDomainRestrictionEnabled":
if option.Value == "true" && len(common.EmailDomainWhitelist) == 0 {
c.JSON(http.StatusOK, gin.H{