Last change
on this file since 9030 was
2564,
checked in by joachim, 17 years ago
|
make only visible for staff
|
-
Property svn:keywords set to
Id
|
File size:
532 bytes
|
Line | |
---|
1 | ## Script (Python) "getWAeUPGroups" |
---|
2 | ##bind container=container |
---|
3 | ##bind context=context |
---|
4 | ##bind namespace= |
---|
5 | ##bind script=script |
---|
6 | ##bind subpath=traverse_subpath |
---|
7 | ##parameters=key=None |
---|
8 | # $Id: getWAeUPGroups.py 2564 2007-11-07 10:50:54Z joachim $ |
---|
9 | """ |
---|
10 | Retun the groups as an vocabulary |
---|
11 | |
---|
12 | """ |
---|
13 | if context.isStudent(): |
---|
14 | return context.REQUEST.RESPONSE.redirect("%s/srp_anonymous_view" % context.portal_url()) |
---|
15 | |
---|
16 | groups = context.portal_directories.groups.searchEntries(group='*') |
---|
17 | if key is None: |
---|
18 | return [(g,g) for g in groups] |
---|
19 | if key in groups: |
---|
20 | return key |
---|
21 | return "unknown Group %s" % key |
---|
Note: See
TracBrowser for help on using the repository browser.