8000 issue-44 Fix the problem that the automatic registration cannot register the mailbox by HuangWeiCen · Pull Request #80 · actiontech/sqle · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

issue-44 Fix the problem that the automatic registration cannot register the mailbox #80

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 12, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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