Last change
on this file since 1957 was
1957,
checked in by joachim, 17 years ago
|
replace calls to isStudent by inline statements, please test.
|
File size:
550 bytes
|
Line | |
---|
1 | ## Script (Python) "isStaff" |
---|
2 | ##bind container=container |
---|
3 | ##bind context=context |
---|
4 | ##bind namespace= |
---|
5 | ##bind script=script |
---|
6 | ##bind subpath=traverse_subpath |
---|
7 | ##parameters= |
---|
8 | ##title= |
---|
9 | ## |
---|
10 | # $Id: $ |
---|
11 | |
---|
12 | # if context.portal_membership.isAnonymousUser(): |
---|
13 | # return False |
---|
14 | # return not context.isStudent() |
---|
15 | |
---|
16 | mtool = context.portal_membership |
---|
17 | member = mtool.getAuthenticatedMember() |
---|
18 | member_id = str(member) |
---|
19 | for c in member_id: |
---|
20 | is_student = True |
---|
21 | if c not in ('0123456789'): |
---|
22 | is_student = False |
---|
23 | break |
---|
24 | return not (is_student and len(member_id) == 7) |
---|
Note: See
TracBrowser for help on using the repository browser.