Changeset 3102
- Timestamp:
- 4 Feb 2008, 12:52:30 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/base/skins/waeup_student/getPersonalInfo.py
r1871 r3102 16 16 17 17 request = context.REQUEST 18 mtool = context.portal_membership 19 wf = context.portal_workflow 20 member = mtool.getAuthenticatedMember() 21 member_id = str(member) 22 path_info = request.get('PATH_INFO').split('/') 23 ##from Products.zdb import set_trace 24 ##set_trace() 25 if mtool.isAnonymousUser(): 18 # mtool = context.portal_membership 19 # wf = context.portal_workflow 20 # member = mtool.getAuthenticatedMember() 21 # member_id = str(member) 22 # path_info = request.get('PATH_INFO').split('/') 23 # ##from Products.zdb import set_trace 24 # ##set_trace() 25 # if mtool.isAnonymousUser(): 26 # return None 27 # info = {} 28 # requested_id = context.getStudentId() 29 # if requested_id and not context.isStaff() and member_id != requested_id: 30 # logger.info('%s tried to access personal object of %s' % (member_id,requested_id)) 31 # student_id = requested_id 32 # return None 33 # elif context.isStaff(): 34 # student_id = requested_id 35 # else: 36 # student_id = member_id 37 38 info = context.waeup_tool.getAccessInfo(context) 39 student_id = info['student_id'] 40 if student_id is None: 26 41 return None 27 info = {}28 requested_id = context.getStudentId()29 if requested_id and not context.isStaff() and member_id != requested_id:30 logger.info('%s tried to access personal object of %s' % (member_id,requested_id))31 student_id = requested_id32 return None33 elif context.isStaff():34 student_id = requested_id35 else:36 student_id = member_id37 38 42 39 43 students_object = context.portal_url.getPortalObject().campus.students
Note: See TracChangeset for help on using the changeset viewer.