diff options
author | Harrison Healey <harrisonmhealey@gmail.com> | 2016-05-12 21:36:02 -0400 |
---|---|---|
committer | Corey Hulen <corey@hulen.com> | 2016-05-12 18:36:02 -0700 |
commit | 4f22cbc92bf131fe37dbed43a4154a43e344d8cf (patch) | |
tree | 259fa2e8061214e2a1081396a596ddb571128dd1 | |
parent | 94f8be51f91203d5d6ccbd99dd721b7e945791bf (diff) | |
download | chat-4f22cbc92bf131fe37dbed43a4154a43e344d8cf.tar.gz chat-4f22cbc92bf131fe37dbed43a4154a43e344d8cf.tar.bz2 chat-4f22cbc92bf131fe37dbed43a4154a43e344d8cf.zip |
Stopped login code from falling back to LDAP when it's disabled (#2986)
-rw-r--r-- | api/authentication.go | 2 | ||||
-rw-r--r-- | api/user.go | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/api/authentication.go b/api/authentication.go index 9243947ad..d30fc0a1f 100644 --- a/api/authentication.go +++ b/api/authentication.go @@ -127,7 +127,7 @@ func checkUserNotDisabled(user *model.User) *model.AppError { } func authenticateUser(user *model.User, password, mfaToken string) (*model.User, *model.AppError) { - ldapAvailable := *utils.Cfg.LdapSettings.Enable && einterfaces.GetLdapInterface() != nil + ldapAvailable := *utils.Cfg.LdapSettings.Enable && einterfaces.GetLdapInterface() != nil && utils.IsLicensed && *utils.License.Features.LDAP if user.AuthService == model.USER_AUTH_SERVICE_LDAP { if !ldapAvailable { diff --git a/api/user.go b/api/user.go index 9e93ae779..559cda076 100644 --- a/api/user.go +++ b/api/user.go @@ -487,7 +487,7 @@ func login(c *Context, w http.ResponseWriter, r *http.Request) { } func getUserForLogin(loginId string, onlyLdap bool) (*model.User, *model.AppError) { - ldapAvailable := *utils.Cfg.LdapSettings.Enable && einterfaces.GetLdapInterface() != nil + ldapAvailable := *utils.Cfg.LdapSettings.Enable && einterfaces.GetLdapInterface() != nil && utils.IsLicensed && *utils.License.Features.LDAP if result := <-Srv.Store.User().GetForLogin( loginId, |