Ignore:
Timestamp:
16 Nov 2006, 14:21:44 (18 years ago)
Author:
joachim
Message:

special search_form for clearance-officers,
only clearance-states can be searched,
only students for whom the member is ClearanceOfficer? will be shown.

Location:
WAeUP_SRP/trunk/skins/waeup_student
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/skins/waeup_student/get_searchable_student_states.py

    r874 r875  
    1818voc = context.portal_vocabularies.searchable_student_states
    1919
    20 if key is None:
    21     return voc.items()
    22 return voc.get(key)
     20if key is not None:
     21    return voc.get(key)
     22if "ClearanceOfficers" in member.getGroups():
     23    return [item for item in voc.items() if item[0].startswith('clear')]
     24return voc.items()
    2325
    2426
  • WAeUP_SRP/trunk/skins/waeup_student/isClearanceOfficer.py

    r871 r875  
    55##bind script=script
    66##bind subpath=traverse_subpath
    7 ##parameters=
     7##parameters=info=None
    88##title=
    99##
     
    1616member = mtool.getAuthenticatedMember()
    1717
    18 info = context.getStudentInfo()
     18if info is None:
     19    info = context.getStudentInfo()
    1920if info is None:
    2021    return False
     
    2829roles = member.getRolesInContext(res[0].getObject())
    2930
    30 return "ClearanceOfficer" in roles or context.isManager
     31return "ClearanceOfficer" in roles
    3132
Note: See TracChangeset for help on using the changeset viewer.