mirror of
https://github.com/grafana/grafana.git
synced 2025-08-03 01:22:29 +08:00
Config: Support JSON list syntax (#61288)
* Config: Separate lists either by spaces or by commas. * Simplify space separation * use separate function for the config strings * Change behavior only if string contains quotes * add test for invalid string * Use JSON list syntax * ignore leading spaces when process list * Add notes about using JSON lists into the docs * Fix typo * Apply suggestions from code review Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com> Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
This commit is contained in:
@ -110,6 +110,12 @@ the group `foo`, set
|
||||
allowed_groups = example, foo/bar
|
||||
```
|
||||
|
||||
To put values containing spaces in the list, use the following JSON syntax:
|
||||
|
||||
```ini
|
||||
allowed_groups = ["Admins", "Software Engineers"]
|
||||
```
|
||||
|
||||
Note that in GitLab, the group or subgroup name doesn't always match its
|
||||
display name, especially if the display name contains spaces or special
|
||||
characters. Make sure you always use the group or subgroup name as it appears
|
||||
|
@ -81,6 +81,12 @@ The `allowed_domains` option limits access to the users belonging to the specifi
|
||||
allowed_domains = mycompany.com mycompany.org
|
||||
```
|
||||
|
||||
To put values containing spaces in the list, use the following JSON syntax:
|
||||
|
||||
```ini
|
||||
allowed_groups = ["Admins", "Software Engineers"]
|
||||
```
|
||||
|
||||
### Map roles
|
||||
|
||||
Grafana can attempt to do role mapping through Okta OAuth. In order to achieve this, Grafana checks for the presence of a role using the [JMESPath](http://jmespath.org/examples.html) specified via the `role_attribute_path` configuration option.
|
||||
|
@ -390,6 +390,12 @@ You can use `*` as the Grafana organization in the mapping if you want all users
|
||||
|
||||
With the [`allowed_organizations`]({{< relref "../../../configure-grafana/enterprise-configuration/#allowed-organizations" >}}) option you can specify a list of organizations where the user must be a member of at least one of them to be able to log in to Grafana.
|
||||
|
||||
To put values containing spaces in the list, use the following JSON syntax:
|
||||
|
||||
```ini
|
||||
allowed_organizations = ["org 1", "second org"]
|
||||
```
|
||||
|
||||
### Example SAML configuration
|
||||
|
||||
```bash
|
||||
|
Reference in New Issue
Block a user