增加删除用户时也删除缓存中的授权信息
This commit is contained in:
parent
d771ad6ab6
commit
661435f80a
@ -2,6 +2,7 @@ package api
|
||||
|
||||
import (
|
||||
"github.com/labstack/echo/v4"
|
||||
"next-terminal/pkg/global"
|
||||
"next-terminal/pkg/model"
|
||||
"next-terminal/pkg/utils"
|
||||
"strconv"
|
||||
@ -79,6 +80,7 @@ func UserDeleteEndpoint(c echo.Context) error {
|
||||
}
|
||||
if loginLogs != nil && len(loginLogs) > 0 {
|
||||
for j := range loginLogs {
|
||||
global.Cache.Delete(loginLogs[j].ID)
|
||||
model.Logout(loginLogs[j].ID)
|
||||
}
|
||||
}
|
||||
|
@ -127,6 +127,7 @@ class LoginForm extends Component {
|
||||
</Card>
|
||||
|
||||
<Modal title="双因素认证" visible={this.state.totpModalVisible} confirmLoading={this.state.confirmLoading}
|
||||
maskClosable={false}
|
||||
onOk={() => {
|
||||
this.formRef.current
|
||||
.validateFields()
|
||||
|
@ -609,6 +609,7 @@ class User extends Component {
|
||||
this.state.changePasswordVisible ?
|
||||
<Modal title="修改密码" visible={this.state.changePasswordVisible}
|
||||
confirmLoading={this.state.changePasswordConfirmLoading}
|
||||
maskClosable={false}
|
||||
onOk={() => {
|
||||
this.changePasswordFormRef.current
|
||||
.validateFields()
|
||||
|
Loading…
Reference in New Issue
Block a user