source: WAeUP_SRP/trunk/skins/waeup_default/campus_index.py @ 599

Last change on this file since 599 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"""
12return the correct campus_index_html
13"""
14
15
16request = context.REQUEST
17redirect = request.RESPONSE.redirect
18pm = context.portal_membership
19
20if pm.isAnonymousUser():
21    return redirect("%s/campus_anonymous_view" % request.get('URL1'))
22
23campus = context.portal_catalog(meta_type = "University")[-1].getObject()
24member = pm.getAuthenticatedMember()
25roles = member.getRoles()
26isManager = "Manager" in roles or "SectionManager" in roles
27isStudent = "Student" in roles
28
29if isManager:
30    return redirect("%s/campus_manager_view" % campus.absolute_url())
31
32if isStudent:
33    return redirect("%s/students_index" % campus.students.absolute_url())
34
Note: See TracBrowser for help on using the repository browser.