Skip to content

Commit

Permalink
Merge pull request #760 from fstagni/fixTS
Browse files Browse the repository at this point in the history
fix: getting users and not DNs list
  • Loading branch information
fstagni authored Apr 19, 2024
2 parents 8b90bb9 + 828f8e3 commit 6d25d9c
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/WebAppDIRAC/WebApp/handler/TransformationMonitorHandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]}
Expand Down

0 comments on commit 6d25d9c

Please sign in to comment.