~sloecode/sloecode/1.0

« back to all changes in this revision

Viewing changes to sloecode/controllers/admin/person.py

  • Committer: Thomi Richards
  • Date: 2011-07-22 04:22:26 UTC
  • mfrom: (109.1.11 trunk)
  • Revision ID: thomir@gmail.com-20110722042226-by0xiql2au2ja88u
Final 1.0 version merge.

Show diffs side-by-side

added added

removed removed

Lines of Context:
140
140
 
141
141
        Session.merge(person)
142
142
        Session.commit()
143
 
        h.flash("Person Updated Successfully")
 
143
        h.flash("Details Updated Successfully")
144
144
 
145
 
        # If this user isn't a user admin it's someone modifying there own details
 
145
        # We can get here from more than one place. If there's a came_from field
 
146
        # in the form, redirect us back there. Otherwise, redirect us to the admin
 
147
        # person list page.
 
148
        if request.params.has_key('came_from'):
 
149
            return redirect(request.params['came_from'])
146
150
        try:
147
151
            has_site_role(role=USER_ADMIN).check_authorization(request.environ)
148
152
            return redirect(h.url(controller='admin/person', action='retrieve'))