avoid variable name 'id'

This commit is contained in:
Helmut Merz 2025-05-07 18:28:21 +02:00
parent a72553c2de
commit 6a0a0841a1

View file

@ -84,16 +84,16 @@ def getInternalPrincipal(id, context=None, pau=None):
raise PrincipalLookupError(id)
def getPrincipalForUserId(id, context=None, auth=None):
if not id:
def getPrincipalForUserId(userId, context=None, auth=None):
if not userId:
return None
if auth is None:
auth = component.getUtility(IAuthentication, context=context)
try:
return auth.getPrincipal(id)
return auth.getPrincipal(userId)
except PrincipalLookupError:
from scopes.web.auth import oidc
return oidc.Principal(id, dict(name=id))
return oidc.Principal(userId, dict(name=userId))
#return None