mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-09-17 12:06:41 +08:00
parent
429e2c6cbe
commit
1278e910f5
2 changed files with 6 additions and 3 deletions
|
@ -37,7 +37,7 @@ func (u *AuthService) Login(c *gin.Context, info dto.Login, entrance string) (*d
|
|||
return nil, "", buserr.New("ErrRecordNotFound")
|
||||
}
|
||||
if nameSetting.Value != info.Name {
|
||||
return nil, "ErrAuth", nil
|
||||
return nil, "ErrAuth", buserr.New("ErrAuth")
|
||||
}
|
||||
if err = checkPassword(info.Password); err != nil {
|
||||
return nil, "ErrAuth", err
|
||||
|
@ -47,7 +47,7 @@ func (u *AuthService) Login(c *gin.Context, info dto.Login, entrance string) (*d
|
|||
return nil, "", err
|
||||
}
|
||||
if len(entranceSetting.Value) != 0 && entranceSetting.Value != entrance {
|
||||
return nil, "ErrEntrance", nil
|
||||
return nil, "ErrEntrance", buserr.New("ErrEntrance")
|
||||
}
|
||||
mfa, err := settingRepo.Get(repo.WithByKey("MFAStatus"))
|
||||
if err != nil {
|
||||
|
|
|
@ -27,7 +27,10 @@
|
|||
<el-table-column :label="$t('logs.loginAgent')" show-overflow-tooltip prop="agent" />
|
||||
<el-table-column :label="$t('logs.loginStatus')" prop="status">
|
||||
<template #default="{ row }">
|
||||
<Status :status="row.status" :msg="row.message" />
|
||||
<Status
|
||||
:status="row.status"
|
||||
:msg="row.message === 'ErrAuth' ? $t('commons.login.errorAuthInfo') : row.message"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
|
|
Loading…
Add table
Reference in a new issue