Commit 39e4a362 authored by Jérome Perrin's avatar Jérome Perrin

fixup! access_token: don't allow RestrictedAccessToken without assignments

use PAS API to verify presence of valid logins
parent 01f3d079
......@@ -38,12 +38,13 @@ if access_token_document.getValidationState() == 'validated':
break
else:
return None
for login in agent_document.contentValues(
portal_type=context.getPortalObject().getPortalLoginTypeList()):
if login.getValidationState() == 'validated':
break
else:
user, = context.getPortalObject().acl_users.searchUsers(
exact_match=True,
id=agent_document.Person_getUserId())
if not user['login_list']:
return None
result = agent_document
return result
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment