mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-10-14 05:53:43 +08:00
用户操作权限增加角色权限过滤,优化角色/部门关系树生成,修复验证码空参数不验证问题
This commit is contained in:
@@ -57,6 +57,9 @@ func Generate(ctx context.Context) (id string, base64 string) {
|
||||
|
||||
// Verify 验证输入的验证码是否正确
|
||||
func Verify(id, answer string) bool {
|
||||
if id == "" || answer == "" {
|
||||
return false
|
||||
}
|
||||
c := base64Captcha.NewCaptcha(new(base64Captcha.DriverString), base64Captcha.DefaultMemStore)
|
||||
return c.Verify(id, gstr.ToLower(answer), true)
|
||||
}
|
||||
|
Reference in New Issue
Block a user