Ignore:
Timestamp:
16 Nov 2006, 13:05:12 (18 years ago)
Author:
joachim
Message:

first draft of view for ClearanceOfficers?
steps to make it work:

  1. Create a group CLearanceOfficers
  2. delegate SectionReader? to this Group in students
  3. Put the supposed CO's in this Group
  4. modify the cpsskinstheme like so:

if context.isStaff():

return 'WAeUP_Backoffice'

return 'WAeUP_Student'

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

Legend:

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

    r844 r874  
    1414
    1515"""
    16 request = context.REQUEST
    17 
    18 wf = context.portal_workflow
    19 mtool = context.portal_membership
    20 member = mtool.getAuthenticatedMember()
    21 path_info = request.get('PATH_INFO').split('/')
    22 #roles = member.getRolesInContext(context)
    23 roles = member.getRoles()
    24 isStudent = "Student" in roles
    25 isStaff = not isStudent and not mtool.isAnonymousUser()
    26 #isManager = "Manager" in roles or "SectionManager" in roles or isStaff
    27 isManager = isStaff
    28 return isManager
     16return context.isStaff()
  • WAeUP_SRP/trunk/skins/waeup_default/isStudent.py

    r845 r874  
    55##bind script=script
    66##bind subpath=traverse_subpath
    7 ##parameters=student=None
     7##parameters=
    88##title=
    99##
     
    1212return True if the member is considered a Student
    1313"""
    14 request = context.REQUEST
    15 
    16 wf = context.portal_workflow
    17 mtool = context.portal_membership
    18 member = mtool.getAuthenticatedMember()
    19 path_info = request.get('PATH_INFO').split('/')
    20 #roles = member.getRolesInContext(context)
    21 roles = member.getRoles()  # Student role is global
    22 isStudent = "Student" in roles
    23 return isStudent
     14roles = context.portal_membership.getAuthenticatedMember().getRolesInContext(context)
     15return  "Student" in roles
Note: See TracChangeset for help on using the changeset viewer.