Skip to content

Commit

Permalink
Merge pull request #80 from actiontech/issue-44-fix-bug
Browse files Browse the repository at this point in the history
issue-44 Fix the problem that the automatic registration cannot register the mailbox
  • Loading branch information
sjjian authored Nov 12, 2021
2 parents 8c8c3e3 + c26d908 commit 382da4a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions sqle/api/controller/v1/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,15 +171,15 @@ func newLdapLoginV3WhenUserNotExist(configuration *model.LDAPConfiguration, user
}
}

func (l ldapLoginV3) login(password string) (err error) {
func (l *ldapLoginV3) login(password string) (err error) {
err = l.loginToLdap(password)
if err != nil {
return err
}
return l.autoRegisterUser()
}

func (l ldapLoginV3) loginToLdap(password string) (err error) {
func (l *ldapLoginV3) loginToLdap(password string) (err error) {
ldapC, _, err := model.GetStorage().GetLDAPConfiguration()
if err != nil {
return err
Expand Down Expand Up @@ -220,7 +220,7 @@ func (l ldapLoginV3) loginToLdap(password string) (err error) {
return nil
}

func (l ldapLoginV3) autoRegisterUser() (err error) {
func (l *ldapLoginV3) autoRegisterUser() (err error) {
if l.userExist {
return nil
}
Expand All @@ -246,7 +246,7 @@ func newSqleLogin(user *model.User) *sqleLogin {
}
}

func (s sqleLogin) login(password string) (err error) {
func (s *sqleLogin) login(password string) (err error) {
if password != s.user.Password {
return fmt.Errorf("password is wrong or user does not exist")
}
Expand Down

0 comments on commit 382da4a

Please sign in to comment.