From cf57095a4d9929358af786b54c8da627bd121e68 Mon Sep 17 00:00:00 2001 From: Federico Stagni Date: Mon, 22 Jan 2024 15:58:06 +0100 Subject: [PATCH] fix: proxies have no groups (since a while!) --- src/DIRAC/FrameworkSystem/Client/ProxyManagerClient.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/DIRAC/FrameworkSystem/Client/ProxyManagerClient.py b/src/DIRAC/FrameworkSystem/Client/ProxyManagerClient.py index 12bfa464354..b8f6ee67dee 100755 --- a/src/DIRAC/FrameworkSystem/Client/ProxyManagerClient.py +++ b/src/DIRAC/FrameworkSystem/Client/ProxyManagerClient.py @@ -639,17 +639,14 @@ def getVOMSAttributes(self, chain): """ return VOMS().getVOMSAttributes(chain) - def getUploadedProxyLifeTime(self, DN, group=None): + def getUploadedProxyLifeTime(self, DN): """Get the remaining seconds for an uploaded proxy :param str DN: user DN - :param str group: group :return: S_OK(int)/S_ERROR() """ parameters = dict(UserDN=[DN]) - if group: - parameters["UserGroup"] = [group] result = self.getDBContents(parameters) if not result["OK"]: return result @@ -658,10 +655,9 @@ def getUploadedProxyLifeTime(self, DN, group=None): return S_OK(0) pNames = list(data["ParameterNames"]) dnPos = pNames.index("UserDN") - groupPos = pNames.index("UserGroup") expiryPos = pNames.index("ExpirationTime") for row in data["Records"]: - if DN == row[dnPos] and group == row[groupPos]: + if DN == row[dnPos]: td = row[expiryPos] - datetime.datetime.utcnow() secondsLeft = td.days * 86400 + td.seconds return S_OK(max(0, secondsLeft))