Ignore:
Timestamp:
18 Dec 2006, 19:44:57 (18 years ago)
Author:
joachim
Message:

files for custom

Location:
WAeUP_SRP/trunk/skins/waeup_default
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/skins/waeup_default/isSectionOfficer.py

    r911 r1077  
    1010# $Id: isManager.py 888 2006-11-17 21:28:48Z henrik $
    1111
     12if context.isStudent():
     13    return False
    1214mtool = context.portal_membership
    1315roles = mtool.getAuthenticatedMember().getRolesInContext(context)
    14 return "SectionManager" in roles or\
    15        "Manager" in roles or\
    16        "SectionOfficer" in roles
     16return "SectionOfficer" in roles or\
     17       "SectionManager" in roles or\
     18       "Manager" in roles
     19       
  • WAeUP_SRP/trunk/skins/waeup_default/isStaff.py

    r911 r1077  
    1010# $Id: $
    1111
     12if context.portal_membership.isAnonymousUser():
     13    return False
     14return not context.isStudent()
     15
    1216mtool = context.portal_membership
    1317member = mtool.getAuthenticatedMember()
  • WAeUP_SRP/trunk/skins/waeup_default/isStudent.py

    r1042 r1077  
    1010# $Id$
    1111
    12 #session = context.REQUEST.SESSION
    13 #roles = member.getRolesInContext(context)
    14 #return  "Student" in roles
    15 
    16 mtool = context.portal_membership
    17 member = mtool.getAuthenticatedMember()
    18 member_id = str(member)
    19 if len(member_id) == 7:
    20     try:
    21         int(member_id[1:])
    22         return True
    23     except:
    24         return False
     12member_id = str(context.portal_membership.getAuthenticatedMember())
     13if len(member_id) != 7:
     14    return False
     15try:
     16    int(member_id[1:])
     17    return True
     18except:
     19    return False
Note: See TracChangeset for help on using the changeset viewer.