Commit c9b43e4b authored by Jérome Perrin's avatar Jérome Perrin

authentication_policy: fix pylint messages and enable coding style test

parent 2f143d52
Pipeline #8485 passed with stage
in 0 seconds
......@@ -50,7 +50,7 @@
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>password, request={}</string> </value>
<value> <string>password, request=None</string> </value>
</item>
<item>
<key> <string>_proxy_roles</string> </key>
......
"""
File a failed authentication attempt.
"""
from DateTime import DateTime
portal = context.getPortalObject()
portal_preferences = portal.portal_preferences
......
......@@ -10,8 +10,6 @@ if not portal.portal_preferences.isAuthenticationPolicyEnabled():
now = DateTime()
one_second = 1/24.0/60.0/60.0
check_duration = portal_preferences.getPreferredAuthenticationFailureCheckDuration()
block_duration = portal_preferences.getPreferredAuthenticationFailureBlockDuration()
max_authentication_failures = portal_preferences.getPreferredMaxAuthenticationFailure()
check_time = now - check_duration*one_second
# acknowledge last authentication events for user
......
......@@ -3,7 +3,6 @@
"""
from DateTime import DateTime
from Products.ZSQLCatalog.SQLCatalog import Query
from Products.ERP5Type.Document import newTempBase
portal = context.getPortalObject()
portal_preferences = portal.portal_preferences
......
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