mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2024-11-28 03:23:52 -06:00
Allow OAuth2 params OAUTH2_NAME, OAUTH2_DISPLAY_NAME, OAUTH2_ICON, OAUTH2_BUTTON_COLOR to be optional. #7965
This commit is contained in:
parent
0ab5e0d4ef
commit
9b64acb3d2
@ -5,12 +5,15 @@
|
||||
{% set _ = ns.langOptions.append({'value': key, 'label': lang}) %}
|
||||
{% endfor %}
|
||||
{% set oauth2_config = [] %}
|
||||
{% for i in config.OAUTH2_CONFIG %}
|
||||
{% set _tmp = oauth2_config.append({'OAUTH2_NAME': config.OAUTH2_CONFIG[loop.index-1]['OAUTH2_NAME'],
|
||||
'OAUTH2_BUTTON_COLOR': config.OAUTH2_CONFIG[loop.index-1]['OAUTH2_BUTTON_COLOR'],
|
||||
'OAUTH2_DISPLAY_NAME': config.OAUTH2_CONFIG[loop.index-1]['OAUTH2_DISPLAY_NAME'],
|
||||
'OAUTH2_ICON': config.OAUTH2_CONFIG[loop.index-1]['OAUTH2_ICON']
|
||||
}) %}
|
||||
{% set oauth2_config_to_be_included = ['OAUTH2_NAME', 'OAUTH2_DISPLAY_NAME', 'OAUTH2_ICON', 'OAUTH2_BUTTON_COLOR' ] %}
|
||||
{% for oauth_client in config.OAUTH2_CONFIG %}
|
||||
{% set _tmp = [] %}
|
||||
{% for key, value in oauth_client.items() %}
|
||||
{% if key in oauth2_config_to_be_included %}
|
||||
{% set _ = _tmp.append((key, value)) %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% set _ = oauth2_config.append(dict.from_keys(_tmp)) %}
|
||||
{% endfor %}
|
||||
|
||||
{% set page_props = {
|
||||
|
Loading…
Reference in New Issue
Block a user