source: main/waeup.kofa/trunk/src/waeup/kofa/students/permissions.py @ 9819

Last change on this file since 9819 was 9335, checked in by Henrik Bettermann, 12 years ago

ApplicantAccount? can't reuse checkPassword.

Add new role and permission.

  • Property svn:keywords set to Id
File size: 3.6 KB
RevLine 
[7191]1## $Id: permissions.py 9335 2012-10-15 05:08:01Z henrik $
2##
[6655]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
[6660]25class HandleStudent(grok.Permission):
26    grok.name('waeup.handleStudent')
[6655]27
[6660]28class ViewStudent(grok.Permission):
29    grok.name('waeup.viewStudent')
30
[7240]31class ViewStudentsTab(grok.Permission):
32    grok.name('waeup.viewStudentsTab')
[7184]33
[7240]34class ViewMyStudentDataTab(grok.Permission):
35    grok.name('waeup.viewMyStudentDataTab')
36
37class ViewStudentsContainer(grok.Permission):
38    grok.name('waeup.viewStudentsContainer')
39
[6930]40class PayStudent(grok.Permission):
41    grok.name('waeup.payStudent')
42
[7181]43class HandleAccommodation(grok.Permission):
44    grok.name('waeup.handleAccommodation')
45
[7127]46class UploadStudentFile(grok.Permission):
47    grok.name('waeup.uploadStudentFile')
48
[7136]49class ManageStudent(grok.Permission):
50    grok.name('waeup.manageStudent')
[6655]51
[7136]52class ClearStudent(grok.Permission):
53    grok.name('waeup.clearStudent')
54
[7334]55class ValidateStudent(grok.Permission):
56    grok.name('waeup.validateStudent')
57
[9273]58class TriggerTransition(grok.Permission):
59    grok.name('waeup.triggerTransition')
60
[9335]61class LoginAsStudent(grok.Permission):
62    grok.name('waeup.loginAsStudent')
63
[6660]64# Local role
65class StudentRecordOwner(grok.Role):
66    grok.name('waeup.local.StudentRecordOwner')
67    grok.title(u'Student Record Owner')
[7127]68    grok.permissions('waeup.handleStudent', 'waeup.uploadStudentFile',
[7181]69                     'waeup.viewStudent', 'waeup.payStudent',
[8367]70                     'waeup.handleAccommodation')
[6660]71
[7178]72# Site Roles
[6678]73class StudentRole(grok.Role):
74    grok.name('waeup.Student')
[8367]75    grok.permissions('waeup.viewAcademics', 'waeup.viewMyStudentDataTab',
76                     'waeup.Authenticated')
[6678]77
[6655]78class StudentsOfficer(grok.Role):
79    grok.name('waeup.StudentsOfficer')
[7154]80    grok.title(u'Students Officer (view only)')
[7240]81    grok.permissions('waeup.viewStudent','waeup.viewStudents',
82          'waeup.viewStudentsTab', 'waeup.viewStudentsContainer')
[7154]83
84class StudentsManager(grok.Role):
85    grok.name('waeup.StudentsManager')
86    grok.title(u'Students Manager')
[8367]87    grok.permissions('waeup.viewStudent', 'waeup.viewStudents',
88                     'waeup.manageStudent', 'waeup.viewStudentsContainer',
[7181]89                     'waeup.payStudent', 'waeup.uploadStudentFile',
[8367]90                     'waeup.viewStudentsTab', 'waeup.handleAccommodation')
[7154]91
92class StudentsClearanceOfficer(grok.Role):
93    grok.name('waeup.StudentsClearanceOfficer')
94    grok.title(u'Clearance Officer (all students)')
[7334]95    grok.permissions('waeup.clearStudent','waeup.viewStudent')
96
97class StudentsCourseAdviser(grok.Role):
98    grok.name('waeup.StudentsCourseAdviser')
99    grok.title(u'Course Adviser (all students)')
[9335]100    grok.permissions('waeup.validateStudent','waeup.viewStudent')
101
102class StudentImpersonator(grok.Role):
103    grok.name('waeup.StudentImpersonator')
104    grok.title(u'Student Impersonator')
105    grok.permissions('waeup.loginAsStudent')
Note: See TracBrowser for help on using the repository browser.