From 828f8e3a16833ace45bc9ea6b28a1e0ef6f628e4 Mon Sep 17 00:00:00 2001 From: Federico Stagni Date: Thu, 18 Apr 2024 16:37:26 +0200 Subject: [PATCH] fix: getting users and not DNs list --- .../WebApp/handler/TransformationMonitorHandler.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/WebAppDIRAC/WebApp/handler/TransformationMonitorHandler.py b/src/WebAppDIRAC/WebApp/handler/TransformationMonitorHandler.py index 34ae48e0..f6b1ac97 100644 --- a/src/WebAppDIRAC/WebApp/handler/TransformationMonitorHandler.py +++ b/src/WebAppDIRAC/WebApp/handler/TransformationMonitorHandler.py @@ -267,16 +267,15 @@ def __workflowxml(self, transid): def __getLoggingInfo(self, transid): if (result := TransformationClient().getTransformationLogging(transid))["OK"]: if len(data := result["Value"]) > 0: - dndb = {} + userdb = {} callback = [] - if (result := gConfig.getSections("/Security/Users"))["OK"]: - for user in result["Value"]: - dndb[gConfig.getValue(f"/Security/Users/{user}/DN")] = user + if (result := gConfig.getSections("/Registry/Users"))["OK"]: + userdb = result["Value"] for i in data: - DN = i["AuthorDN"] - i["AuthorDN"] = dndb.get(DN, DN) + user = i["Author"] + i["Author"] = userdb.get(user, user) date = TimeUtilities.toString(i["MessageDate"]) - callback.append([i["Message"], date, i["AuthorDN"]]) + callback.append([i["Message"], date, i["Author"]]) return {"success": "true", "result": callback} return {"success": "false", "error": "Nothing to display"} return {"success": "false", "error": result["Message"]}