diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/base/conf.go | 8 | ||||
-rw-r--r-- | modules/middleware/repo.go | 7 |
2 files changed, 9 insertions, 6 deletions
diff --git a/modules/base/conf.go b/modules/base/conf.go index 9a9adfdac6..17b55316a8 100644 --- a/modules/base/conf.go +++ b/modules/base/conf.go @@ -53,7 +53,6 @@ var ( Domain string SecretKey string RunUser string - LdapAuth bool RepoRootPath string ScriptType string @@ -93,6 +92,7 @@ var Service struct { NotifyMail bool ActiveCodeLives int ResetPwdCodeLives int + LdapAuth bool } func ExecDir() (string, error) { @@ -179,8 +179,8 @@ func newLogService() { } func newLdapService() { - LdapAuth = Cfg.MustBool("security", "LDAP_AUTH", false) - if !LdapAuth { + Service.LdapAuth = Cfg.MustBool("security", "LDAP_AUTH", false) + if !Service.LdapAuth { return } @@ -201,7 +201,7 @@ func newLdapService() { } if nbsrc == 0 { log.Warn("No valide LDAP found, LDAP Authentication NOT enabled") - LdapAuth = false + Service.LdapAuth = false return } diff --git a/modules/middleware/repo.go b/modules/middleware/repo.go index 34144fe3d8..2d2778cb00 100644 --- a/modules/middleware/repo.go +++ b/modules/middleware/repo.go @@ -26,11 +26,14 @@ func RepoAssignment(redirect bool, args ...bool) martini.Handler { var displayBare bool if len(args) >= 1 { - validBranch = args[0] + // Note: argument has wrong value in Go1.3 martini. + // validBranch = args[0] + validBranch = true } if len(args) >= 2 { - displayBare = args[1] + // displayBare = args[1] + displayBare = true } var ( |