Stopped login code from falling back to LDAP when it's disabled (#2986)

Этот коммит содержится в:
Harrison Healey
2016-05-12 21:36:02 -04:00
коммит произвёл Corey Hulen
родитель 94f8be51f9
Коммит 4f22cbc92b
2 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@@ -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 {

Просмотреть файл

@@ -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,