source: waeup_product/trunk/skins/waeup_student/students_folder_view.py @ 102

Last change on this file since 102 was 96, checked in by joachim, 19 years ago

=adding and editing of several types

  • Property svn:keywords set to Id
File size: 641 bytes
Line 
1##parameters=REQUEST=None,psm=None,groups=None
2
3# $Id: students_folder_view.py 96 2005-10-27 06:51:08Z joachim $
4
5"""Default view for the forum. If post_id is not None, post with id = <post_id>
6will be displayed, otherwise first post will be displayed."""
7
8member = context.portal_membership.getAuthenticatedMember()
9if not context.portal_membership.isAnonymousUser():
10    roles = member.getRoles()
11    if 'Manager' in roles:
12        return context.folder_view()
13    elif 'StudentManager' in roles:
14        return context.students_folder_view_manager(psm=psm)
15    elif 'Student' in roles:
16        return context.students_folder_view_student(psm=psm)
17return context.students_folder_view_all(psm=psm)
Note: See TracBrowser for help on using the repository browser.