Commit 036b1b64 authored by Jérome Perrin's avatar Jérome Perrin

authentication: fixup renaming of Person_unblockLogin -> Login_unblockLogin

parent a64dc42d
......@@ -75,7 +75,7 @@
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/Person_unblockLogin</string> </value>
<value> <string>string:${object_url}/Login_unblockLogin</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -23,18 +23,19 @@ kw = {'portal_type': 'Authentication Event',
'validation_state' : 'confirmed'}
failure_list = portal.portal_catalog(**kw)
for failure in failure_list:
person = failure.getDestinationValue()
if person not in all_blocked_user_login_dict.keys():
all_blocked_user_login_dict[person] = []
all_blocked_user_login_dict[person].append(failure)
login = failure.getDestinationValue()
if login not in all_blocked_user_login_dict.keys():
all_blocked_user_login_dict[login] = []
all_blocked_user_login_dict[login].append(failure)
# leave only ones that are blocked:
for person, failure_list in all_blocked_user_login_dict.items():
for login, failure_list in all_blocked_user_login_dict.items():
if len(failure_list) >= max_authentication_failures:
blocked_user_login_list.append(newTempBase(portal,
person.getTitle(),
person = login.getParentValue()
blocked_user_login_list.append(newTempBase(portal,
person.getTitle(),
**{'title': person.getTitle(),
'count':len(failure_list),
'reference': person.Person_getUserId(),
'url': person.absolute_url()}))
'reference': login.getReference(),
'url': login.absolute_url()}))
return blocked_user_login_list
......@@ -127,7 +127,7 @@
<key> <string>_text</string> </key>
<value> <string encoding="cdata"><![CDATA[
python: \'<a title="Click to unblock login" href="%s/Person_unblockLogin?cancel_url=%s"> Unblock </a>\' %(cell.url, here.absolute_url())
python: \'<a title="Click to unblock login" href="%s/Login_unblockLogin?cancel_url=%s"> Unblock </a>\' %(cell.url, here.absolute_url())
]]></string> </value>
</item>
......
Person | unblock_user_login
ERP5 Login | unblock_user_login
System Preference | authentication_policy
\ No newline at end of file
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