Ignore:
Timestamp:
17 Jan 2009, 07:29:24 (16 years ago)
Author:
Henrik Bettermann
Message:

implement password notification module (send mail not yet tested)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/WAeUPTool.py

    r3840 r3858  
    182182                                                        "Manager" in roles)
    183183        info['is_clearanceofficer'] = not is_student and ("ClearanceOfficer" in roles)
    184         is_allowed = info['is_allowed'] = not is_anonymous
     184        #is_allowed = info['is_allowed'] = not is_anonymous
    185185        requested_id = context.getStudentId()
    186186        student_id  = None
    187         if is_allowed:
    188             if not is_student and requested_id:
    189                 student_id  = requested_id
    190             elif 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:   
    191191                logger.info('%s tried to access %s of %s' % (member_id,context.portal_type,requested_id))
    192             else:
    193                 student_id = member_id
    194192        info['student_id'] = student_id
    195193        return info
     
    570568    ###)
    571569
    572     security.declareProtected(View,'getCredential') ###(
     570    security.declarePublic('getCredential') ###(
    573571    def getCredential(self,student_id):
    574572        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
    581580        if student_entry is None:
    582581            return None
Note: See TracChangeset for help on using the changeset viewer.