Changeset 3858 for WAeUP_SRP/trunk/WAeUPTool.py
- Timestamp:
- 17 Jan 2009, 07:29:24 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/WAeUPTool.py
r3840 r3858 182 182 "Manager" in roles) 183 183 info['is_clearanceofficer'] = not is_student and ("ClearanceOfficer" in roles) 184 is_allowed = info['is_allowed'] = not is_anonymous184 #is_allowed = info['is_allowed'] = not is_anonymous 185 185 requested_id = context.getStudentId() 186 186 student_id = None 187 if is_allowed:188 if not is_student and requested_id:189 student_id 190 el if not is_allowed and (not is_staff or member_id != requested_id):187 if not is_anonymous and requested_id: 188 if (is_student and member_id == requested_id) or is_staff: 189 student_id = requested_id 190 else: 191 191 logger.info('%s tried to access %s of %s' % (member_id,context.portal_type,requested_id)) 192 else:193 student_id = member_id194 192 info['student_id'] = student_id 195 193 return info … … 570 568 ###) 571 569 572 security.declareP rotected(View,'getCredential') ###(570 security.declarePublic('getCredential') ###( 573 571 def getCredential(self,student_id): 574 572 student_entry = getattr(self.portal_directories.students,student_id,None) 575 if not self.isStaff(): 576 mtool = self.portal_membership 577 member = mtool.getAuthenticatedMember() 578 logger = logging.getLogger('WAeUPTool.getCredential') 579 logger.info('%s tried to access password of %s' % (member,student_id)) 580 return None 573 #import pdb;pdb.set_trace() 574 #if not self.isStaff(): 575 # mtool = self.portal_membership 576 # member = mtool.getAuthenticatedMember() 577 # logger = logging.getLogger('WAeUPTool.getCredential') 578 # logger.info('%s tried to access password of %s' % (member,student_id)) 579 # return None 581 580 if student_entry is None: 582 581 return None
Note: See TracChangeset for help on using the changeset viewer.