- Timestamp:
- 26 Feb 2008, 16:54:44 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/base/skins/waeup_epayment/interswitch_cb.py
r3232 r3236 21 21 from AccessControl import Unauthorized 22 22 import DateTime 23 23 24 if context.portal_membership.isAnonymousUser(): 24 25 return None … … 30 31 member = mtool.getAuthenticatedMember() 31 32 member_id = str(member) 32 student_id = context.getStudentId() 33 #student_id = context.getStudentId() 34 access_info = context.waeup_tool.getAccessInfo(context) 35 student_id = access_info['student_id'] 33 36 if student_id is None: # or student_id != member_id: 34 37 logger.info('%s tried to access payment object of %s' % (member_id,student_id)) … … 72 75 # wftool.doActionFor(context,'close') 73 76 return request.RESPONSE.redirect("%s/waeup_document_view" % context.absolute_url()) 74 try: 75 context.getContent().edit(mapping = pd) 76 except: 77 logger.info('%s tried to edit payment %s in state %s' % (student_id, 78 context.getId(), 79 review_state)) 80 return request.RESPONSE.redirect("%s/waeup_document_view" % context.absolute_url()) 77 if access_info['is_student'] and review_state == 'closed': 78 wftool.doActionFor(context,'open') 79 context.getContent().edit(mapping = pd) 80 # except: 81 # logger.info('%s tried to edit payment %s in state %s' % (student_id, 82 # context.getId(), 83 # review_state)) 84 # return request.RESPONSE.redirect("%s/waeup_document_view" % context.absolute_url()) 81 85 82 86 resp = pd['resp_code'] … … 122 126 else: 123 127 logger.info('%s received unsuccessfull callback: %s' % (student_id,pd['resp_desc'])) 124 try:128 if review_state == 'opened': 125 129 wftool.doActionFor(context,'close') 126 except:127 logger.info('%s no workflow action close' % student_id)128 130 129 131
Note: See TracChangeset for help on using the changeset viewer.