Commit 7c9fa1a8 authored by Łukasz Nowak's avatar Łukasz Nowak Committed by Rafael Monnerat

Fix condition.

parent d8af8315
No related merge requests found
......@@ -125,12 +125,12 @@ class ERP5BearerExtractionPlugin(BasePlugin):
token_document = self.portal_catalog.getResultValue(
portal_type=self.token_portal_type,
reference=token,
query=SimpleQuery(comparison_operator='<=', expiration_date=now),
query=SimpleQuery(comparison_operator='>=', expiration_date=now),
validation_state='validated'
)
if token_document is not None:
if token_document.getReference() == token and \
token_document.getExpirationDate() <= now and \
token_document.getExpirationDate() >= now and \
token_document.getValidationState() == 'validated' and \
token_document.getDestinationReference() is not None:
creds['external_login'] = \
......
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