From 56a0a7d1e1fbd9405559a9c6e32962155d9cc562 Mon Sep 17 00:00:00 2001 From: JoramWilander Date: Wed, 22 Jul 2015 15:32:39 -0400 Subject: only show gitlab signup/login links if gitlab oauth is turned on --- utils/config.go | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'utils/config.go') diff --git a/utils/config.go b/utils/config.go index b90337b7e..6a428a5c1 100644 --- a/utils/config.go +++ b/utils/config.go @@ -253,3 +253,14 @@ func IsS3Configured() bool { return true } + +func GetAllowedAuthServices() []string { + authServices := []string{} + for name, service := range Cfg.SSOSettings { + if service.Allow { + authServices = append(authServices, name) + } + } + + return authServices +} -- cgit v1.2.3-1-g7c22