🎨 访问授权码输入错误 3 次后加入验证码 https://github.com/siyuan-note/siyuan/issues/5429

This commit is contained in:
Liang Ding 2022-07-16 10:48:33 +08:00
parent 527753113b
commit b4208bbf36
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
6 changed files with 85 additions and 13 deletions

View file

@ -26,6 +26,12 @@ import (
type SessionData struct {
ID int
AccessAuthCode string
WrongAuthCount int
Captcha string
}
func (sd *SessionData) NeedCaptcha() bool {
return 3 < sd.WrongAuthCount
}
// Save saves the current session of the specified context.