Parcourir la source

minor fix on #1581

tags/v0.9.99
Unknwon il y a 8 ans
Parent
révision
26ac016b9f
3 fichiers modifiés avec 7 ajouts et 10 suppressions
  1. 1
    1
      conf/locale/locale_en-US.ini
  2. 4
    7
      models/login.go
  3. 2
    2
      modules/bindata/bindata.go

+ 1
- 1
conf/locale/locale_en-US.ini Voir le fichier

@@ -334,7 +334,7 @@ license = License
license_helper = Select a license file
readme = Readme
readme_helper = Select a readme template
auto_init = Initialize this repository selected files and template
auto_init = Initialize this repository with selected files and template
create_repo = Create Repository
default_branch = Default Branch
mirror_interval = Mirror Interval (hour)

+ 4
- 7
models/login.go Voir le fichier

@@ -23,13 +23,14 @@ import (

type LoginType int

// Note: new type must be added at the end of list to maintain compatibility.
const (
NOTYPE LoginType = iota
PLAIN
LDAP
DLDAP
SMTP
PAM
DLDAP
)

var (
@@ -107,9 +108,7 @@ func (source *LoginSource) BeforeSet(colName string, val xorm.Cell) {
switch colName {
case "type":
switch LoginType((*val).(int64)) {
case LDAP:
fallthrough
case DLDAP:
case LDAP, DLDAP:
source.Cfg = new(LDAPConfig)
case SMTP:
source.Cfg = new(SMTPConfig)
@@ -233,9 +232,7 @@ func ExternalUserLogin(u *User, name, passwd string, source *LoginSource, autoRe
}

switch source.Type {
case LDAP:
fallthrough
case DLDAP:
case LDAP, DLDAP:
return LoginUserLdapSource(u, name, passwd, source, autoRegister)
case SMTP:
return LoginUserSMTPSource(u, name, passwd, source.ID, source.Cfg.(*SMTPConfig), autoRegister)

+ 2
- 2
modules/bindata/bindata.go
Fichier diff supprimé car celui-ci est trop grand
Voir le fichier


Chargement…
Annuler
Enregistrer