Commit 8de189a1 authored by Gabriel Monnerat's avatar Gabriel Monnerat

erp5_authentication_policy: Use getDocumentValueList API

parent b13d1bf3
portal = context.getPortalObject()
reference = portal.portal_preferences.getPreferredPasswordPolicyReference()
if reference:
document = portal.portal_catalog(reference=reference, limit=1)
document = portal.portal_catalog.getDocumentValueList(
portal_type="Web Page",
validation_state=["released", "published_alive", "published"],
reference=reference,
limit=1)
if document:
return document[0].getTextContent()
return ''
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