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_student/co_searchStudents.py

    r883 r885  
    4949pr = context.portal_registration
    5050path_info = request.get('PATH_INFO').split('/')
    51 is_manager = context.isManager
     51is_manager = context.isManager()
    5252validate = request.has_key("cpsdocument_edit_button")
    5353default = {'search_mode': 'name',
     
    6969                             #psm = "%s, %s" % (psm,ds),
    7070                             students = items,
    71                              is_manager = is_manager,
     71                             allowed = True,
    7272                             )
    7373what = ds.get('search_mode')
     
    9292                             #psm = "%s, %s" % (psm,ds),
    9393                             students = items,
    94                              is_manager = is_manager,
     94                             allowed = True,
    9595                             )
    9696items = []
     
    165165            info = context.getStudentInfo(item)
    166166            students.append(info)
    167     return context.students_co_view(rendered = rend,
     167    return context.students_manager_view(rendered = rend,
    168168                             psm = "",
    169169                             #psm = "%d,%d matching Students found QS = %s" %\
     
    171171                             #psm = "%d found QS = %s items: %s" % (len(items),query_step,items),
    172172                             students = students,
    173                              is_manager = is_manager,
     173                             allowed = True,
    174174                             )
    175 return context.students_co_view(rendered = rend,
     175return context.students_manager_view(rendered = rend,
    176176                             psm = """Step: %s found: %s Your search for "%s" in %s with state %s failed.<br\>%s""" % (query_step,len(items),st,what,state,bools),
    177177                             students = students,
    178                              is_manager = is_manager,
     178                             allowed = True,
    179179                             )
    180180
Note: See TracChangeset for help on using the changeset viewer.