Last change
on this file since 597 was
543,
checked in by Henrik Bettermann, 18 years ago
|
reorganisation part 2
themes modification will follow
|
File size:
890 bytes
|
Line | |
---|
1 | ## Script (Python) "campus_index" |
---|
2 | ##bind container=container |
---|
3 | ##bind context=context |
---|
4 | ##bind namespace= |
---|
5 | ##bind script=script |
---|
6 | ##bind subpath=traverse_subpath |
---|
7 | ##parameters=batch=None |
---|
8 | ##title= |
---|
9 | ## |
---|
10 | # $Id: student_edit.py 486 2006-09-06 10:09:39Z joachim $ |
---|
11 | """ |
---|
12 | return the correct campus_index_html |
---|
13 | """ |
---|
14 | |
---|
15 | |
---|
16 | request = context.REQUEST |
---|
17 | redirect = request.RESPONSE.redirect |
---|
18 | pm = context.portal_membership |
---|
19 | |
---|
20 | if pm.isAnonymousUser(): |
---|
21 | return redirect("%s/campus_anonymous_view" % request.get('URL1')) |
---|
22 | |
---|
23 | campus = context.portal_catalog(meta_type = "University")[-1].getObject() |
---|
24 | member = pm.getAuthenticatedMember() |
---|
25 | roles = member.getRoles() |
---|
26 | isManager = "Manager" in roles or "SectionManager" in roles |
---|
27 | isStudent = "Student" in roles |
---|
28 | |
---|
29 | if isManager: |
---|
30 | return redirect("%s/campus_manager_view" % campus.absolute_url()) |
---|
31 | |
---|
32 | if isStudent: |
---|
33 | return redirect("%s/students_index" % campus.students.absolute_url()) |
---|
34 | |
---|
Note: See
TracBrowser for help on using the repository browser.