Commit 77b864bc authored by Xiaowu Zhang's avatar Xiaowu Zhang

erp5_authentication_policy: prevent to create too much credential recovery and authentication event

parent 522bd980
......@@ -8,7 +8,10 @@ if not portal_preferences.isAuthenticationPolicyEnabled():
# no policy, no sense to file failure
return 0
activate_kw = {'tag': 'authentication_event_%s' %context.getReference()}
tag = 'authentication_event_%s' %context.getReference()
if portal.portal_activities.countMessageWithTag(tag):
return
activate_kw = {'tag': tag}
authentication_event = portal.system_event_module.newContent(
portal_type = "Authentication Event",
activate_kw = activate_kw)
......
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