Ignore:
Timestamp:
23 Feb 2007, 10:04:14 (18 years ago)
Author:
joachim
Message:

can now be called from root

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/skins/waeup_student/change_password.py

    r1474 r1476  
    1818validate = request.has_key("change_password")
    1919students_dir = context.portal_directories.students
     20mtool = context.portal_membership
     21member = mtool.getAuthenticatedMember()
     22member_id = str(member)
    2023lt = context.portal_layouts
    2124wt = context.waeup_tool
    22 student_id = context.getStudentId()
     25requested_id = context.getStudentId()
     26if requested_id and not context.isStaff() and member_id != requested_id:
     27    logger.info('"%s", "tried to access", "%s"' % (member_id,requested_id))
     28    return None
     29elif context.isStaff():
     30    student_id = requested_id
     31else:
     32    student_id = member_id
    2333res,psm,ds = lt.renderLayout(layout_id= 'student_change_password',
    2434                      schema_id= 'student_change_password',
Note: See TracChangeset for help on using the changeset viewer.