mirror of
https://github.com/h44z/wg-portal
synced 2025-06-26 18:16:21 +00:00
[DOCS] Fix example config wrt. admin_value_regex and admin_group_regex
Before this change, the example config in some places had `admin_value_regex` and `admin_group_regex` as list items under `admin_mapping`, which caused the following error: ``` panic: failed to load config from yaml: yaml error: yaml: unmarshal errors: line 45: cannot unmarshal !!seq into config.OauthAdminMapping ``` Removing the list and making them normal YML items prevents this error, as `admin_mapping` does not expect a list. This also fits my understanding of the [config implementation](7557a6ef5a/internal/config/auth.go (L32)
) and another [example config file](662e9c0549/config.yml.sample (L88)
). Signed-off-by: klmmr <35450576+klmmr@users.noreply.github.com>
This commit is contained in:
parent
7557a6ef5a
commit
2d14d7095f
@ -102,7 +102,7 @@ auth:
|
|||||||
department: department
|
department: department
|
||||||
is_admin: wg_admin
|
is_admin: wg_admin
|
||||||
admin_mapping:
|
admin_mapping:
|
||||||
- admin_value_regex: ^true$
|
admin_value_regex: ^true$
|
||||||
registration_enabled: true
|
registration_enabled: true
|
||||||
log_user_info: true
|
log_user_info: true
|
||||||
|
|
||||||
@ -125,7 +125,7 @@ auth:
|
|||||||
department: department
|
department: department
|
||||||
user_groups: groups
|
user_groups: groups
|
||||||
admin_mapping:
|
admin_mapping:
|
||||||
- admin_group_regex: ^the-admin-group$
|
admin_group_regex: ^the-admin-group$
|
||||||
registration_enabled: true
|
registration_enabled: true
|
||||||
log_user_info: true
|
log_user_info: true
|
||||||
```
|
```
|
||||||
@ -157,7 +157,7 @@ auth:
|
|||||||
firstname: name
|
firstname: name
|
||||||
is_admin: this-attribute-must-be-true
|
is_admin: this-attribute-must-be-true
|
||||||
admin_mapping:
|
admin_mapping:
|
||||||
- admin_value_regex: ^(True|true)$
|
admin_value_regex: ^(True|true)$
|
||||||
registration_enabled: true
|
registration_enabled: true
|
||||||
|
|
||||||
# a sample provider where either users with the attribute `this-attribute-must-be-true` set to `true` or
|
# a sample provider where either users with the attribute `this-attribute-must-be-true` set to `true` or
|
||||||
|
Loading…
Reference in New Issue
Block a user