mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -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_id = some_id
|
||||||
client_secret = some_secret
|
client_secret = some_secret
|
||||||
scopes = user:email
|
scopes = user:email
|
||||||
|
team_ids =
|
||||||
auth_url = https://github.com/login/oauth/authorize
|
auth_url = https://github.com/login/oauth/authorize
|
||||||
token_url = https://github.com/login/oauth/access_token
|
token_url = https://github.com/login/oauth/access_token
|
||||||
api_url = https://api.github.com/user
|
api_url = https://api.github.com/user
|
||||||
|
@ -75,7 +75,8 @@ func NewOAuthService() {
|
|||||||
// GitHub.
|
// GitHub.
|
||||||
if name == "github" {
|
if name == "github" {
|
||||||
setting.OAuthService.GitHub = true
|
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.
|
// Google.
|
||||||
@ -105,6 +106,7 @@ type SocialGithub struct {
|
|||||||
allowedDomains []string
|
allowedDomains []string
|
||||||
ApiUrl string
|
ApiUrl string
|
||||||
allowSignup bool
|
allowSignup bool
|
||||||
|
teamIds []int
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *SocialGithub) Type() int {
|
func (s *SocialGithub) Type() int {
|
||||||
|
Loading…
Reference in New Issue
Block a user