Skip to content

Commit 2821b6a

Browse files
authored
Merge pull request #7285 from aldbr/v8.0_FIX_pilot-logging-info-token
[8.0] fix: Getting token for a specific VO in WMSUtilities
2 parents 08dbcdb + 5ab8be2 commit 2821b6a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/DIRAC/WorkloadManagementSystem/Service/WMSUtilities.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
from DIRAC import S_OK, S_ERROR, gLogger, gConfig
88
from DIRAC.ConfigurationSystem.Client.Helpers.Resources import getQueue
9-
from DIRAC.ConfigurationSystem.Client.Helpers.Registry import getGroupOption, getUsernameForDN
9+
from DIRAC.ConfigurationSystem.Client.Helpers.Registry import getGroupOption, getUsernameForDN, getVOForGroup
1010
from DIRAC.FrameworkSystem.Client.ProxyManagerClient import gProxyManager
1111
from DIRAC.FrameworkSystem.Client.TokenManagerClient import gTokenManager
1212
from DIRAC.Resources.Computing.ComputingElementFactory import ComputingElementFactory
@@ -75,7 +75,8 @@ def setPilotCredentials(ce, pilotDict):
7575
:param pilotDict: pilot parameter dictionary
7676
:return: S_OK/S_ERROR
7777
"""
78-
if "Token" in ce.ceParameters.get("Tag", []):
78+
vo = getVOForGroup(pilotDict["OwnerGroup"])
79+
if "Token" in ce.ceParameters.get("Tag", []) or f"Token:{vo}" in ce.ceParameters.get("Tag", []):
7980
result = gTokenManager.getToken(
8081
userGroup=pilotDict["OwnerGroup"],
8182
scope=PILOT_SCOPES,

0 commit comments

Comments
 (0)