When a user change his password from the directory loses his credentials and a window login is shown by the web browser.
There are two solutions:
* In the function renderEditEntryDetailed of BaseDirectory?.py add the following italic lines
if not ds.hasError(id_field) and dm.data[id_field] != id:
ds.setError(id_field, 'cpsschemas_err_readonly')
ok = 0
if ok:
dm._commit()
else:
layout_mode = layout_mode_err
# If the user has changed his password, send the credentials again
''name = self.portal_membership.getAuthenticatedMember().getId()
if request.form['id'] == name:
if request.form['widget__confirm'] != '':
self.cookie_authentication.credentialsChanged('', name, request["widget__confirm"])''
else:
ok = 1
rendered = self._renderLayout(layout_structure, ds,
layout_mode=layout_mode, ok=ok, **kw)
* The other solutions is modify the page template cpsdirectory_entry_edit_form.pt adding the following lines at the end of the first "tal:block define":
user_name python: context.portal_membership.getAuthenticatedMember().getId();
same_user python: validate and request['id'] == user_name or nothing;
credentials_changed python: same_user and request['widget__confirm'] != '' or nothing;
dummy python: credentials_changed and context.cookie_authentication.credentialsChanged('', user_name, request['widget__confirm']) or nothing;