feat: support enableErrorMask2 config

This commit is contained in:
Yang Luo
2024-09-25 19:28:53 +08:00
parent 097adac871
commit 717c53f6e5
2 changed files with 15 additions and 0 deletions

View File

@ -410,6 +410,12 @@ func (c *ApiController) GetEmailAndPhone() {
organization := c.Ctx.Request.Form.Get("organization")
username := c.Ctx.Request.Form.Get("username")
enableErrorMask2 := conf.GetConfigBool("enableErrorMask2")
if enableErrorMask2 {
c.ResponseError("Error")
return
}
user, err := object.GetUserByFields(organization, username)
if err != nil {
c.ResponseError(err.Error())