mirror of
https://github.com/ansible/awx.git
synced 2026-03-13 23:17:32 -02:30
Add ui_next to /api/v2/config
- Add ui_next to /api/v2/config - enable banner to show up for normal user since /api/v2/settings is only available to admin users
This commit is contained in:
@@ -272,6 +272,9 @@ class ApiV2ConfigView(APIView):
|
|||||||
|
|
||||||
pendo_state = settings.PENDO_TRACKING_STATE if settings.PENDO_TRACKING_STATE in ('off', 'anonymous', 'detailed') else 'off'
|
pendo_state = settings.PENDO_TRACKING_STATE if settings.PENDO_TRACKING_STATE in ('off', 'anonymous', 'detailed') else 'off'
|
||||||
|
|
||||||
|
# Guarding against settings.UI_NEXT being set to a non-boolean value
|
||||||
|
ui_next_state = settings.UI_NEXT if settings.UI_NEXT in (True, False) else False
|
||||||
|
|
||||||
data = dict(
|
data = dict(
|
||||||
time_zone=settings.TIME_ZONE,
|
time_zone=settings.TIME_ZONE,
|
||||||
license_info=license_data,
|
license_info=license_data,
|
||||||
@@ -280,6 +283,7 @@ class ApiV2ConfigView(APIView):
|
|||||||
analytics_status=pendo_state,
|
analytics_status=pendo_state,
|
||||||
analytics_collectors=all_collectors(),
|
analytics_collectors=all_collectors(),
|
||||||
become_methods=PRIVILEGE_ESCALATION_METHODS,
|
become_methods=PRIVILEGE_ESCALATION_METHODS,
|
||||||
|
ui_next=ui_next_state,
|
||||||
)
|
)
|
||||||
|
|
||||||
# If LDAP is enabled, user_ldap_fields will return a list of field
|
# If LDAP is enabled, user_ldap_fields will return a list of field
|
||||||
|
|||||||
Reference in New Issue
Block a user