source: WAeUP_SRP/trunk/skins/waeup_student/isClearanceOfficer.py @ 869

Last change on this file since 869 was 867, checked in by joachim, 18 years ago

patch for default field width in stringWidgets
isClearanceOfficer added

  • Property svn:keywords set to Id
File size: 670 bytes
Line 
1## Script (Python) "isClearanceOfficer"
2##bind container=container
3##bind context=context
4##bind namespace=
5##bind script=script
6##bind subpath=traverse_subpath
7##parameters=REQUEST
8##title=
9##
10# $Id: isClearanceOfficer.py 867 2006-11-14 16:15:38Z joachim $
11"""
12
13"""
14request = REQUEST
15wftool = context.portal_workflow
16mtool = context.portal_membership
17member = mtool.getAuthenticatedMember()
18
19info = context.getStudentInfo()
20if info is None:
21    return False
22if info['course'] is None:
23    return False
24   
25
26res = context.portal_catalog(portal_type="Department",id=info['course_doc'].department)
27if len res != 1:
28    return False
29
30roles = member.getRolesInContext(res[0].getObject())
31   
32return "ClearanceOfficer" in roles
33
Note: See TracBrowser for help on using the repository browser.