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 edited

Legend:

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

    r879 r885  
    99##
    1010# $Id: $
    11 """
    1211
    13 """
    1412mtool = context.portal_membership
    15 if mtool.isAnonymousUser():
    16     return False
    17 roles = mtool.getAuthenticatedMember().getRolesInContext(context)
    18 return not "Student" in roles
     13member = mtool.getAuthenticatedMember()
     14roles = member.getRolesInContext(context)
    1915
     16return "SectionManager" in roles or\
     17       "ClearanceOfficer" in roles or\
     18       "ClearanceOfficers" in member.getGroups()
Note: See TracChangeset for help on using the changeset viewer.