mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-10 15:35:59 +01:00
(refs #78)Fix for LDAP authentication.
This commit is contained in:
@@ -27,9 +27,10 @@ trait SignInControllerBase extends ControllerBase { self: SystemSettingsService
|
||||
|
||||
post("/signin", form){ form =>
|
||||
val settings = loadSystemSettings()
|
||||
settings.authType match {
|
||||
case "LDAP" => ldapAuthentication(form, settings)
|
||||
case _ => defaultAuthentication(form)
|
||||
if(settings.ldapAuthentication){
|
||||
ldapAuthentication(form, settings)
|
||||
} else {
|
||||
defaultAuthentication(form)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -23,8 +23,8 @@ trait SystemSettingsControllerBase extends ControllerBase with FlashMapSupport {
|
||||
"password" -> trim(label("SMTP Password", optional(text()))),
|
||||
"ssl" -> trim(label("Enable SSL", optional(boolean())))
|
||||
)(Smtp.apply)),
|
||||
"authType" -> trim(label("Auth Type", text(required))),
|
||||
"ldap" -> optional(_.get("authType") == Some("LDAP"), mapping(
|
||||
"ldapAuthentication" -> trim(label("LDAP", boolean())),
|
||||
"ldap" -> optionalIfNotChecked("ldapAuthentication", mapping(
|
||||
"host" -> trim(label("LDAP host", text(required))),
|
||||
"port" -> trim(label("LDAP port", number(required))),
|
||||
"baseDN" -> trim(label("BaseDN", text(required))),
|
||||
|
||||
Reference in New Issue
Block a user