source: main/waeup.kofa/branches/0.2/src/waeup/kofa/students/permissions.py @ 15284

Last change on this file since 15284 was 10465, checked in by Henrik Bettermann, 11 years ago

Let transcript officers find their students via the students container page.

  • Property svn:keywords set to Id
File size: 4.1 KB
Line 
1## $Id: permissions.py 10465 2013-08-07 11:18:43Z henrik $
2##
3## Copyright (C) 2011 Uli Fouquet & Henrik Bettermann
4## This program is free software; you can redistribute it and/or modify
5## it under the terms of the GNU General Public License as published by
6## the Free Software Foundation; either version 2 of the License, or
7## (at your option) any later version.
8##
9## This program is distributed in the hope that it will be useful,
10## but WITHOUT ANY WARRANTY; without even the implied warranty of
11## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12## GNU General Public License for more details.
13##
14## You should have received a copy of the GNU General Public License
15## along with this program; if not, write to the Free Software
16## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17##
18"""
19Permissions for the student section.
20"""
21import grok
22
23# Student section permissions
24
25class HandleStudent(grok.Permission):
26    grok.name('waeup.handleStudent')
27
28class ViewStudent(grok.Permission):
29    grok.name('waeup.viewStudent')
30
31class ViewStudentsTab(grok.Permission):
32    grok.name('waeup.viewStudentsTab')
33
34class ViewMyStudentDataTab(grok.Permission):
35    grok.name('waeup.viewMyStudentDataTab')
36
37class ViewStudentsContainer(grok.Permission):
38    grok.name('waeup.viewStudentsContainer')
39
40class PayStudent(grok.Permission):
41    grok.name('waeup.payStudent')
42
43class HandleAccommodation(grok.Permission):
44    grok.name('waeup.handleAccommodation')
45
46class UploadStudentFile(grok.Permission):
47    grok.name('waeup.uploadStudentFile')
48
49class ManageStudent(grok.Permission):
50    grok.name('waeup.manageStudent')
51
52class ClearStudent(grok.Permission):
53    grok.name('waeup.clearStudent')
54
55class ValidateStudent(grok.Permission):
56    grok.name('waeup.validateStudent')
57
58class EditStudyLevel(grok.Permission):
59    grok.name('waeup.editStudyLevel')
60
61class TriggerTransition(grok.Permission):
62    grok.name('waeup.triggerTransition')
63
64class LoginAsStudent(grok.Permission):
65    grok.name('waeup.loginAsStudent')
66
67# Local role
68class StudentRecordOwner(grok.Role):
69    grok.name('waeup.local.StudentRecordOwner')
70    grok.title(u'Student Record Owner')
71    grok.permissions('waeup.handleStudent', 'waeup.uploadStudentFile',
72                     'waeup.viewStudent', 'waeup.payStudent',
73                     'waeup.handleAccommodation', 'waeup.editStudyLevel')
74
75# Site Roles
76class StudentRole(grok.Role):
77    grok.name('waeup.Student')
78    grok.title(u'Student (do not assign)')
79    grok.permissions('waeup.viewAcademics', 'waeup.viewMyStudentDataTab',
80                     'waeup.Authenticated')
81
82class StudentsOfficer(grok.Role):
83    grok.name('waeup.StudentsOfficer')
84    grok.title(u'Students Officer (view only)')
85    grok.permissions('waeup.viewStudent','waeup.viewStudents',
86          'waeup.viewStudentsTab', 'waeup.viewStudentsContainer')
87
88class StudentsManager(grok.Role):
89    grok.name('waeup.StudentsManager')
90    grok.title(u'Students Manager')
91    grok.permissions('waeup.viewStudent', 'waeup.viewStudents',
92                     'waeup.manageStudent', 'waeup.viewStudentsContainer',
93                     'waeup.payStudent', 'waeup.uploadStudentFile',
94                     'waeup.viewStudentsTab', 'waeup.handleAccommodation')
95
96class TranscriptOfficer(grok.Role):
97    grok.name('waeup.TranscriptOfficer')
98    grok.title(u'Transcript Officer')
99    grok.permissions('waeup.viewAcademics',
100                     'waeup.viewTranscript',
101                     'waeup.viewStudent',
102                     'waeup.viewStudents',
103                     'waeup.viewStudentsTab',
104                     'waeup.viewStudentsContainer',
105                     )
106
107class StudentsClearanceOfficer(grok.Role):
108    grok.name('waeup.StudentsClearanceOfficer')
109    grok.title(u'Clearance Officer (all students)')
110    grok.permissions('waeup.clearStudent','waeup.viewStudent')
111
112class StudentsCourseAdviser(grok.Role):
113    grok.name('waeup.StudentsCourseAdviser')
114    grok.title(u'Course Adviser (all students)')
115    grok.permissions('waeup.validateStudent','waeup.viewStudent',
116                     'waeup.editStudyLevel')
117
118class StudentImpersonator(grok.Role):
119    grok.name('waeup.StudentImpersonator')
120    grok.title(u'Student Impersonator')
121    grok.permissions('waeup.loginAsStudent')
Note: See TracBrowser for help on using the repository browser.