Skip to content

Commit

Permalink
if user exist but login is Prohibit return return nil, and Prohibit err
Browse files Browse the repository at this point in the history
  • Loading branch information
6543 committed Nov 7, 2019
1 parent d6a30be commit 1657a62
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions models/login_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,9 @@ func LoginViaLDAP(user *User, login, password string, source *LoginSource, autoR
if err != nil {
return nil, err
} else if isExist {
if user.ProhibitLogin {
return nil, ErrUserProhibitLogin{user.ID, user.Name}
}
user.FullName = composeFullName(sr.Name, sr.Surname, sr.Username)
user.Email = sr.Mail
// Change existing admin flag only if AdminFilter option is set
Expand Down

0 comments on commit 1657a62

Please sign in to comment.