Skip to content
This repository has been archived by the owner on May 31, 2023. It is now read-only.

Allow to override enabled parameter in auth block #141

Merged
merged 5 commits into from
Mar 23, 2019

Conversation

Igorshp
Copy link
Contributor

@Igorshp Igorshp commented Feb 25, 2019

The current template forces enabled flag to always be True if the block is present.
While for most additional providers this works, however it makes it difficult to disable the basic provider as it's enabled by default. (for example when using auth proxy instead).

This PR allows passing enabled parameter to the auth sections. If missing, it will be set to True by default (for backwards compatibility with current config)

Example config:

 vars:
     grafana_auth:
       basic:
         enabled: false
       proxy:
         header_name: X-Forwarded-Email
         header_property: email
         auto_sign_up: true

@Igorshp
Copy link
Contributor Author

Igorshp commented Feb 25, 2019

This is interesting. The tests are failing because of test config.
It's asking for

grafana_auth:
  basic: true

ERROR:  argument of type 'bool' is not iterable

It would make sense to keep uniformity and change documentation for basic block to look like:

grafana_auth:
  basic:
    enabled: True

Would love to hear some thoughts on this.

@paulfantom paulfantom changed the title [ template ] Allow to override enabled parameter in auth block Allow to override enabled parameter in auth block Mar 23, 2019
@paulfantom paulfantom merged commit 2c4ee62 into cloudalchemy:master Mar 23, 2019
@lock
Copy link

lock bot commented Apr 22, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Apr 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants