| 24 | } |
| 25 | |
| 26 | func (a *API) Settings(w http.ResponseWriter, r *http.Request) error { |
| 27 | config := a.getConfig(r.Context()) |
| 28 | |
| 29 | return sendJSON(w, http.StatusOK, &Settings{ |
| 30 | ExternalProviders: ProviderSettings{ |
| 31 | Bitbucket: config.External.Bitbucket.Enabled, |
| 32 | GitHub: config.External.Github.Enabled, |
| 33 | GitLab: config.External.Gitlab.Enabled, |
| 34 | Google: config.External.Google.Enabled, |
| 35 | Facebook: config.External.Facebook.Enabled, |
| 36 | Email: !config.External.Email.Disabled, |
| 37 | SAML: config.External.Saml.Enabled, |
| 38 | }, |
| 39 | ExternalLabels: ProviderLabels{ |
| 40 | SAML: config.External.Saml.Name, |
| 41 | }, |
| 42 | DisableSignup: config.DisableSignup, |
| 43 | Autoconfirm: config.Mailer.Autoconfirm, |
| 44 | }) |
| 45 | } |