Commit e84d7a3c authored by Ivan Tyagov's avatar Ivan Tyagov

Take into account validation_state of authentication events.

parent 2c766fec
...@@ -102,6 +102,7 @@ if not is_temp_object:\n ...@@ -102,6 +102,7 @@ if not is_temp_object:\n
last_password_event = portal.portal_catalog.getResultValue(\n last_password_event = portal.portal_catalog.getResultValue(\n
portal_type = \'Password Event\',\n portal_type = \'Password Event\',\n
default_destination_uid = context.getUid(),\n default_destination_uid = context.getUid(),\n
validation_state = \'confirmed\',\n
sort_on = ((\'creation_date\', \'DESC\',),))\n sort_on = ((\'creation_date\', \'DESC\',),))\n
if last_password_event is not None:\n if last_password_event is not None:\n
last_password_modification_date = last_password_event.getCreationDate()\n last_password_modification_date = last_password_event.getCreationDate()\n
......
...@@ -87,7 +87,7 @@ kw = {\'portal_type\': \'Authentication Event\',\n ...@@ -87,7 +87,7 @@ kw = {\'portal_type\': \'Authentication Event\',\n
\'default_destination_uid\': context.getUid(),\n \'default_destination_uid\': context.getUid(),\n
\'creation_date\': Query(creation_date = check_time,\n \'creation_date\': Query(creation_date = check_time,\n
range=\'min\'),\n range=\'min\'),\n
\'validation_state\' : \'!=acknowledged\',\n \'validation_state\' : \'confirmed\',\n
\'sort_on\' : ((\'creation_date\', \'ASC\',),),\n \'sort_on\' : ((\'creation_date\', \'ASC\',),),\n
\'limit\': max_authentication_failures\n \'limit\': max_authentication_failures\n
}\n }\n
......
...@@ -70,6 +70,7 @@ def _isPasswordExpired():\n ...@@ -70,6 +70,7 @@ def _isPasswordExpired():\n
last_password_event = portal.portal_catalog.getResultValue(\n last_password_event = portal.portal_catalog.getResultValue(\n
portal_type = \'Password Event\',\n portal_type = \'Password Event\',\n
default_destination_uid = context.getUid(),\n default_destination_uid = context.getUid(),\n
validation_state = \'confirmed\',\n
sort_on = ((\'creation_date\', \'DESC\',),))\n sort_on = ((\'creation_date\', \'DESC\',),))\n
expire_date_warning = 0 \n expire_date_warning = 0 \n
if last_password_event is not None:\n if last_password_event is not None:\n
......
...@@ -66,6 +66,7 @@ authentication_event = portal.system_event_module.newContent(\n ...@@ -66,6 +66,7 @@ authentication_event = portal.system_event_module.newContent(\n
portal_type = "Authentication Event",\n portal_type = "Authentication Event",\n
activate_kw = activate_kw)\n activate_kw = activate_kw)\n
authentication_event.setDestinationValue(context)\n authentication_event.setDestinationValue(context)\n
authentication_event.confirm()\n
return authentication_event\n return authentication_event\n
</string> </value> </string> </value>
</item> </item>
......
...@@ -71,7 +71,7 @@ kw = {\'portal_type\': \'Authentication Event\',\n ...@@ -71,7 +71,7 @@ kw = {\'portal_type\': \'Authentication Event\',\n
\'default_destination_uid\': context.getUid(),\n \'default_destination_uid\': context.getUid(),\n
\'creation_date\': Query(creation_date = check_time,\n \'creation_date\': Query(creation_date = check_time,\n
range=\'min\'),\n range=\'min\'),\n
\'validation_state\' : \'!=acknowledged\',\n \'validation_state\' : \'confirmed\',\n
\'sort_on\' : ((\'creation_date\', \'ASC\',),),\n \'sort_on\' : ((\'creation_date\', \'ASC\',),),\n
}\n }\n
\n \n
......
...@@ -65,6 +65,7 @@ if number_of_last_password_to_check is not None and number_of_last_password_to_c ...@@ -65,6 +65,7 @@ if number_of_last_password_to_check is not None and number_of_last_password_to_c
source_value = person,\n source_value = person,\n
destination_value = person,\n destination_value = person,\n
password = current_password)\n password = current_password)\n
password_event.confirm()\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
......
17 18
\ No newline at end of file \ 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