mirror of
https://github.com/grafana/grafana.git
synced 2025-09-19 15:12:52 +08:00
Auth: Add skip_org_role_sync setting for github (#61673)
* add: skip_org_role_sync setting for github * fix: frontend * rearranged tests * refactor: assignGrafanaAdmin skip also * Add: tests for allowGrafanaAdmin - both for the case when both settings are set and the setting for only allowGrafanaAdmin * Apply suggestions from code review Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com> * Update docs/sources/setup-grafana/configure-grafana/_index.md Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com> * Update pkg/login/social/github_oauth.go Co-authored-by: Ieva <ieva.vasiljeva@grafana.com> * added vairable inside scope * Update docs/sources/setup-grafana/configure-security/configure-authentication/github/index.md * Update docs/sources/setup-grafana/configure-security/configure-authentication/github/index.md Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com> Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
This commit is contained in:
@ -203,3 +203,16 @@ Your GitHub teams can be referenced in two ways:
|
||||
Example: `@grafana/developers`
|
||||
|
||||
[Learn more about Team Sync]({{< relref "../../configure-team-sync/" >}})
|
||||
|
||||
## Skip organization role sync
|
||||
|
||||
To prevent the sync of organization roles from GitHub, set `skip_org_role_sync` to `true`. This is useful if you want to manage the organization roles for your users from within Grafana.
|
||||
This also impacts the `allow_assign_grafana_admin` setting by not syncing the Grafana admin role from GitHub.
|
||||
|
||||
```ini
|
||||
[auth.github]
|
||||
# ..
|
||||
# prevents the sync of org roles from Github
|
||||
skip_org_role_sync = true
|
||||
``
|
||||
```
|
||||
|
Reference in New Issue
Block a user