Skip to content

Commit

Permalink
feat: add VO to credential dictionary
Browse files Browse the repository at this point in the history
  • Loading branch information
fstagni committed Jan 24, 2024
1 parent 17b504b commit d477691
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/DIRAC/Core/Security/m2crypto/X509Chain.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"]:
Expand Down

0 comments on commit d477691

Please sign in to comment.