From d4776913499e8f263b1b1981253dcb40ae3683a9 Mon Sep 17 00:00:00 2001 From: fstagni Date: Wed, 24 Jan 2024 17:29:10 +0100 Subject: [PATCH] feat: add VO to credential dictionary --- src/DIRAC/Core/Security/m2crypto/X509Chain.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/DIRAC/Core/Security/m2crypto/X509Chain.py b/src/DIRAC/Core/Security/m2crypto/X509Chain.py index c5a347ced78..edda36afa8f 100644 --- a/src/DIRAC/Core/Security/m2crypto/X509Chain.py +++ b/src/DIRAC/Core/Security/m2crypto/X509Chain.py @@ -947,6 +947,7 @@ def getCredentials(self, ignoreDefault=False, withRegistryInfo=True): * username: DIRAC username associated to the DN (needs withRegistryInfo) (see :py:func:`DIRAC.ConfigurationSystem.Client.Helpers.Registry.getUsernameForDN`) * group: DIRAC group, depending on ignoreDefault param(see :py:meth:`.getDIRACGroup`) + * VO: virtual organization * validGroup: True if the group found is in the list of groups the user belongs to * groupProperty: (only if validGroup) get the properties of the group @@ -1003,6 +1004,7 @@ def getCredentials(self, ignoreDefault=False, withRegistryInfo=True): if retVal["OK"] and diracGroup in retVal["Value"]: credDict["validGroup"] = True credDict["groupProperties"] = Registry.getPropertiesForGroup(diracGroup) + credDict["VO"] = Registry.getVOForGroup(diracGroup) elif withRegistryInfo: retVal = Registry.getHostnameForDN(credDict["subject"]) if retVal["OK"]: