From 2b6b1078c7f85ecf091146ec8ea3a5a946bb0a9f Mon Sep 17 00:00:00 2001 From: "jonathan.kerr" Date: Fri, 21 Jun 2024 10:17:52 +0100 Subject: [PATCH] Check how clients are being shown on the dashboard the new client work is almost ready, but unfortunately they don't show up on the dashboard. I've added some debugging language, and turned off production deploys so that sensitive data doesn't get shown to users --- .github/workflows/main.yml | 8 ++++---- templates/dashboard.html | 2 ++ wsgi.py | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 14aeb48..d5f6f46 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -27,10 +27,10 @@ jobs: SERVICE_DOMAIN: sso.nonprod-service.security.gov.uk TF_WORKSPACE: nonprod AWS_REGION: eu-west-2 - - environment: prod-aws - SERVICE_DOMAIN: sso.service.security.gov.uk - TF_WORKSPACE: prod - AWS_REGION: eu-west-2 +# - environment: prod-aws +# SERVICE_DOMAIN: sso.service.security.gov.uk +# TF_WORKSPACE: prod +# AWS_REGION: eu-west-2 environment: name: ${{ matrix.environment }} steps: diff --git a/templates/dashboard.html b/templates/dashboard.html index 0ff00b4..3c46f70 100644 --- a/templates/dashboard.html +++ b/templates/dashboard.html @@ -26,7 +26,9 @@

Dashboard

Applications

{%- if allowed_apps %} +

{{ allowed_apps }}

{%- for a in allowed_apps %} +

{{ a }}

{%- set app = allowed_apps[a] %} {%- if app["name"] and ((app["sign_in_url"] and app["dashboard_display"]) or app["can_manage"]) %}
diff --git a/wsgi.py b/wsgi.py index f2dbb70..d87d82e 100644 --- a/wsgi.py +++ b/wsgi.py @@ -1414,7 +1414,7 @@ def new_client(): request_dict = request.form.to_dict() sso_oidc.save_client( filename=f"{request_dict['app_url']}_{uuid.uuid4().hex}.json", - client={"secret": client_secret, "dashboard_display": True, **request_dict}, + client={"secret": client_secret, **request_dict}, client_id=client_id ) return redirect(f"/view?client_id={client_id}")