From bc19a4db1449d5fd1012c9a6715d122c5c88eb6f Mon Sep 17 00:00:00 2001 From: Fabien Amelinck Date: Tue, 30 Jul 2024 16:45:58 +0100 Subject: [PATCH] PORTAL_SELF::FIXED: disabled workflows listed --- CHANGELOG | 1 + vulture_os/portal/system/self_actions.py | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 08c864fa9..0e8182b5d 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -28,6 +28,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [GUI] Wrong date formatting in the task list - [GUI] [PF] Correctly validate and return errors when changing custom PF rules - [CLUSTER] [PF] Correctly reload configurations when changing SSH/GUI access rules +- [PORTAL] [SELF_SERVICE] Disabled workflows listed ## [2.15.9] - 2024-07-25 diff --git a/vulture_os/portal/system/self_actions.py b/vulture_os/portal/system/self_actions.py index 14cb71825..58c0d4750 100644 --- a/vulture_os/portal/system/self_actions.py +++ b/vulture_os/portal/system/self_actions.py @@ -201,12 +201,13 @@ def perform_action(self): if self.workflow.authentication.enable_external: repo_id = OpenIDRepository.objects.get(client_id=self.workflow.authentication.oauth_client_id).id - for workflow in Workflow.objects.filter(authentication__repositories_id__exact=repo_id): + for workflow in Workflow.objects.filter(authentication__repositories_id__exact=repo_id, enabled=True): # Workflow links needs to go through OpenID redirection if that was the repo used to authenticate if self.workflow.authentication.enable_external or backend_subtype == "openid": + port = workflow.frontend.listener_set.first().port url = workflow.authentication.get_openid_start_url( - req_scheme="https" if workflow.frontend.listener_set.filter(tls_profiles__gt=0).exists() else "http", - workflow_host=workflow.fqdn, + req_scheme="https" if workflow.frontend.has_tls() else "http", + workflow_host=f"{workflow.fqdn}:{port}" if port not in (443, 80) else workflow.fqdn, workflow_path=workflow.public_dir, repo_id=repo_id) else: