mirror of
https://github.com/grafana/grafana.git
synced 2024-11-26 02:40:26 -06:00
Add team_ids configuration option
This commit is contained in:
parent
8a986ec340
commit
7ea579bb71
@ -140,6 +140,7 @@ enabled = false
|
||||
client_id = some_id
|
||||
client_secret = some_secret
|
||||
scopes = user:email
|
||||
team_ids =
|
||||
auth_url = https://github.com/login/oauth/authorize
|
||||
token_url = https://github.com/login/oauth/access_token
|
||||
api_url = https://api.github.com/user
|
||||
|
@ -75,7 +75,8 @@ func NewOAuthService() {
|
||||
// GitHub.
|
||||
if name == "github" {
|
||||
setting.OAuthService.GitHub = true
|
||||
SocialMap["github"] = &SocialGithub{Config: &config, allowedDomains: info.AllowedDomains, ApiUrl: info.ApiUrl, allowSignup: info.AllowSignup}
|
||||
teamIds := sec.Key("team_ids").Ints(",")
|
||||
SocialMap["github"] = &SocialGithub{Config: &config, allowedDomains: info.AllowedDomains, ApiUrl: info.ApiUrl, allowSignup: info.AllowSignup, teamIds: teamIds}
|
||||
}
|
||||
|
||||
// Google.
|
||||
@ -105,6 +106,7 @@ type SocialGithub struct {
|
||||
allowedDomains []string
|
||||
ApiUrl string
|
||||
allowSignup bool
|
||||
teamIds []int
|
||||
}
|
||||
|
||||
func (s *SocialGithub) Type() int {
|
||||
|
Loading…
Reference in New Issue
Block a user