Skip to content

Commit

Permalink
add role_attribute_path
Browse files Browse the repository at this point in the history
  • Loading branch information
akerl committed Sep 29, 2024
1 parent 7d45ef1 commit 4a6eff5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
# @param viewers_can_edit controls whether viewers can use Explore and modify dashboard panels
# @param allowed_organizations sets the organization requirements for Github auth
# @param team_ids sets the team requirements for Github auth
# @param role_attribute_path sets how roles are mapped from Github metadata
# @param plugins sets the plugins to install
# @param extra_config sets extra grafana config flags to use
# @param backup_target sets the target repo for backups
Expand Down Expand Up @@ -53,6 +54,7 @@
Boolean $viewers_can_edit = false,
Array[String] $allowed_organizations = [],
Array[String] $team_ids = [],
Optional[String] $role_attribute_path = undef,
Array[String] $plugins = [],
Array[String] $extra_config = [],
Optional[String] $backup_target = undef,
Expand Down
4 changes: 4 additions & 0 deletions templates/grafana.ini.erb
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,16 @@ scopes = user:email,read:org
auth_url = https://github.com/login/oauth/authorize
token_url = https://github.com/login/oauth/access_token
api_url = https://api.github.com/user
allow_assign_grafana_admin = true
<% unless @allowed_organizations.empty? -%>
allowed_organizations = <%= @allowed_organizations.join(' ') %>
<% end -%>
<% unless @team_ids.empty? -%>
team_ids = <%= @team_ids.join(',') %>
<% end -%>
<% if @role_attribute_path -%>
role_attribute_path = <%= @role_attribute_path %>
<% end -%>
<% if @allow_anonymous -%>

[auth.anonymous]
Expand Down

0 comments on commit 4a6eff5

Please sign in to comment.