diff options
Diffstat (limited to 'model/config.go')
-rw-r--r-- | model/config.go | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/model/config.go b/model/config.go index d4eb1e714..31af619a5 100644 --- a/model/config.go +++ b/model/config.go @@ -15,6 +15,8 @@ const ( IMAGE_DRIVER_LOCAL = "local" IMAGE_DRIVER_S3 = "amazons3" + + SERVICE_GITLAB = "gitlab" ) type ServiceSettings struct { @@ -34,7 +36,7 @@ type ServiceSettings struct { GoogleDeveloperKey string } -type SSOSetting struct { +type SSOSettings struct { Allow bool Secret string Id string @@ -129,7 +131,7 @@ type Config struct { EmailSettings EmailSettings RateLimitSettings RateLimitSettings PrivacySettings PrivacySettings - SSOSettings map[string]SSOSetting + GitLabSSOSettings SSOSettings } func (o *Config) ToJson() string { @@ -141,6 +143,14 @@ func (o *Config) ToJson() string { } } +func (o *Config) GetSSOService(service string) *SSOSettings { + if service == SERVICE_GITLAB { + return &o.GitLabSSOSettings + } + + return nil +} + func ConfigFromJson(data io.Reader) *Config { decoder := json.NewDecoder(data) var o Config |