[Nuxeo-tickets] [Nuxeo Repository] #1711: A user loses his credentials if change his password from the directory

Nuxeo Repository trac at nuxeo.com
Fri Jul 28 12:33:17 CEST 2006


#1711: A user loses his credentials if change his password from the directory
--------------------------+-------------------------------------------------
 Reporter:  tracguest     |       Owner:  fguillaume
     Type:  defect        |      Status:  new       
 Priority:  P2            |   Milestone:  CPS 3.4.2 
Component:  CPSDirectory  |     Version:  3.4.0     
 Severity:  normal        |    Keywords:            
--------------------------+-------------------------------------------------
 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;
 }}}

-- 
Ticket URL: <http://svn.nuxeo.org/trac/pub/ticket/1711>
Nuxeo Repository <http://www.cps-project.org/>
Nuxeo Repository


More information about the Nuxeo-tickets mailing list

This list archive provided by Nuxeo, the leaders of open source ECM. Check out the Nuxeo 5 open source, standards-based ECM project.