Skip to content

Commit

Permalink
refact(user): encode plain password when create, update, reset user p…
Browse files Browse the repository at this point in the history
…assword
  • Loading branch information
Matrix-X committed Dec 3, 2024
1 parent bf20ee3 commit a959be3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions internal/model/organization/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ func (mdl *User) GetTableName(needFull bool) string {

func (mdl *User) HashPassword() (err error) {
if mdl.Password != "" {
// 创建员工,前端密码是plain格式传入
// 先encode一下plain的密码
mdl.Password = securityx.EncodePassword(mdl.Password)
// hash编码过的密码
Expand Down

0 comments on commit a959be3

Please sign in to comment.