allow changing github oauth org and teams

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2020-12-01 19:22:08 +01:00
parent a7cab55782
commit 7dccd21b29
No known key found for this signature in database
GPG Key ID: 4EF064D0E6D63020
3 changed files with 8 additions and 1 deletions

View File

@ -20,6 +20,8 @@ You should also configure OAuth:
```yaml
grafana_oauth_id: '123qwe123qwe123'
grafana_oauth_secret: 'qweasdqweasdqweasdqweasd
grafana_oauth_gh_org: 'evil-corp'
grafana_oauth_gh_team_ids: [ 1234, 5678 ]
```
Optional email configuration might be useful:
```yaml

View File

@ -23,6 +23,8 @@ grafana_password: ~
# OAuth secrets
grafana_oauth_id: ~
grafana_oauth_secret: ~
grafana_oauth_gh_org: 'status-im'
grafana_oauth_gh_team_ids: []
# SMTP for invite emails
grafana_smtp_enabled: false

View File

@ -51,4 +51,7 @@ token_url = https://github.com/login/oauth/access_token
api_url = https://api.github.com/user
allow_sign_up = true
# space-delimited organization names
allowed_organizations = status-im
allowed_organizations = {{ grafana_oauth_gh_org }}
{% if (grafana_oauth_gh_team_ids | length) > 0 %}
team_ids = {{ grafana_oauth_gh_team_ids | join(",") }}
{% endif %}