mirror of
https://github.com/xcat2/confluent.git
synced 2026-09-04 12:07:58 +00:00
Fix exception name
This commit is contained in:
@@ -222,7 +222,7 @@ def authorize(name, element, tenant=False, operation='create',
|
||||
baseelement = element.rsplit(name, 1)[0]
|
||||
if baseelement not in ['/sessions/current/webauthn/registered_credentials/',
|
||||
'/sessions/current/webauthn/validate/']:
|
||||
raise exc.InvalidArgumentExceptionIn('Invalid username for passkey operation')
|
||||
raise exc.InvalidArgumentException('Invalid username for passkey operation')
|
||||
return userobj, manager, user, tenant, skipuserobj
|
||||
if userobj and userobj.get('role', None) == 'Stub':
|
||||
userobj = None
|
||||
|
||||
@@ -300,7 +300,7 @@ async def _authorize_request(req, operation, reqbody):
|
||||
baseelement = element.rsplit(name, 1)[0]
|
||||
if baseelement not in ['/sessions/current/webauthn/registered_credentials/',
|
||||
'/sessions/current/webauthn/validate/']:
|
||||
raise exc.InvalidArgumentExceptionIn('Invalid username for passkey operation')
|
||||
raise exc.InvalidArgumentException('Invalid username for passkey operation')
|
||||
authdata = auth.authorize(name, element=element, operation=operation)
|
||||
else:
|
||||
element = None
|
||||
|
||||
Reference in New Issue
Block a user