From c32f21d98dd62af25047438369f81f0916a712e3 Mon Sep 17 00:00:00 2001 From: aldbr Date: Wed, 29 Jan 2025 16:39:16 +0100 Subject: [PATCH] fix(diracx-routers): search endpoint does not display jobs in GlobalMonitoring is set to false --- diracx-routers/src/diracx/routers/jobs/query.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/diracx-routers/src/diracx/routers/jobs/query.py b/diracx-routers/src/diracx/routers/jobs/query.py index 472602ae..591bb736 100644 --- a/diracx-routers/src/diracx/routers/jobs/query.py +++ b/diracx-routers/src/diracx/routers/jobs/query.py @@ -178,7 +178,11 @@ async def search( { "parameter": "Owner", "operator": ScalarSearchOperator.EQUAL, - "value": user_info.sub, + # TODO-385: https://github.com/DIRACGrid/diracx/issues/385 + # The value shoud be user_info.sub, + # but since we historically rely on the preferred_username + # we will keep using the preferred_username for now. + "value": user_info.preferred_username, } )