aboutsummaryrefslogtreecommitdiffstats
path: root/models/login.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-09-10 17:11:41 -0400
committerUnknwon <u@gogs.io>2015-09-10 17:11:41 -0400
commit06174482826e81fb7c4675efff092e2986c4dac0 (patch)
treedda3e0393111ab21789784316e2463bd920430e9 /models/login.go
parentfa728d8dff2ddb8039efc2767f4fefb2d2f62004 (diff)
downloadgitea-06174482826e81fb7c4675efff092e2986c4dac0.tar.gz
gitea-06174482826e81fb7c4675efff092e2986c4dac0.zip
finish new add auth UI
Diffstat (limited to 'models/login.go')
-rw-r--r--models/login.go10
1 files changed, 4 insertions, 6 deletions
diff --git a/models/login.go b/models/login.go
index 527b763d26..abd4fc0334 100644
--- a/models/login.go
+++ b/models/login.go
@@ -39,7 +39,7 @@ var (
ErrAuthenticationUserUsed = errors.New("Authentication has been used by some users")
)
-var LoginTypes = map[LoginType]string{
+var LoginNames = map[LoginType]string{
LDAP: "LDAP (via BindDN)",
DLDAP: "LDAP (simple auth)",
SMTP: "SMTP",
@@ -118,8 +118,8 @@ func (source *LoginSource) BeforeSet(colName string, val xorm.Cell) {
}
}
-func (source *LoginSource) TypeString() string {
- return LoginTypes[source.Type]
+func (source *LoginSource) TypeName() string {
+ return LoginNames[source.Type]
}
func (source *LoginSource) LDAP() *LDAPConfig {
@@ -315,9 +315,7 @@ const (
SMTP_LOGIN = "LOGIN"
)
-var (
- SMTPAuths = []string{SMTP_PLAIN, SMTP_LOGIN}
-)
+var SMTPAuths = []string{SMTP_PLAIN, SMTP_LOGIN}
func SMTPAuth(a smtp.Auth, cfg *SMTPConfig) error {
c, err := smtp.Dial(fmt.Sprintf("%s:%d", cfg.Host, cfg.Port))