Ignore:
Timestamp:
17 Nov 2006, 16:06:47 (18 years ago)
Author:
joachim
Message:

cleaned up several things:

  1. the definitions for isManager, isStaff, and isClearanceOfficer

are now independant from eachother only based on roles or groups.
The Manager-Role is the superuser-role,
the is-Scripts document what is what.

since isStaff returns false if the member only has Manager-role,
in .cpsskins_theme it must now be:

if context.isStaff() or context.isManager():

return 'WAeUP_Backoffice'

todo: finish the merge of co_searchStudents and searchStudents

File:
1 moved

Legend:

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

    r875 r885  
    55##bind script=script
    66##bind subpath=traverse_subpath
    7 ##parameters=info=None
     7##parameters=
    88##title=
    99##
    1010# $Id$
    11 """
    1211
    13 """
    14 wftool = context.portal_workflow
    1512mtool = context.portal_membership
    16 member = mtool.getAuthenticatedMember()
    17 
    18 if info is None:
    19     info = context.getStudentInfo()
    20 if info is None:
    21     return False
    22 if info['course'] is None:
    23     return False
    24 
    25 res = context.portal_catalog(portal_type="Department",id=info['course_doc'].department)
    26 if len(res) != 1:
    27     return False
    28 
    29 roles = member.getRolesInContext(res[0].getObject())
    30 
     13roles = mtool.getAuthenticatedMember().getRolesInContext(context)
    3114return "ClearanceOfficer" in roles
    3215
Note: See TracChangeset for help on using the changeset viewer.