[19] | 1 | # (C) Copyright 2005 AixtraWare <http://aixtraware.de> |
---|
| 2 | # Author: Joachim Schmitz <js@aixtraware.de> |
---|
| 3 | # |
---|
| 4 | # This program is free software; you can redistribute it and/or modify |
---|
| 5 | # it under the terms of the GNU General Public License version 2 as published |
---|
| 6 | # by the Free Software Foundation. |
---|
| 7 | # |
---|
| 8 | # This program is distributed in the hope that it will be useful, |
---|
| 9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
| 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
| 11 | # GNU General Public License for more details. |
---|
| 12 | # |
---|
| 13 | # You should have received a copy of the GNU General Public License |
---|
| 14 | # along with this program; if not, write to the Free Software |
---|
| 15 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
---|
| 16 | # 02111-1307, USA. |
---|
| 17 | # |
---|
| 18 | # $Id: WAeUPPermissions.py 167 2005-11-12 16:17:03Z joachim $ |
---|
| 19 | |
---|
| 20 | __author__ = "Joachim Schmitz <js@aixtraware.de>" |
---|
| 21 | |
---|
| 22 | """WAeUP Student Permissions |
---|
[84] | 23 | """ |
---|
[19] | 24 | |
---|
[84] | 25 | from AccessControl import ModuleSecurityInfo |
---|
| 26 | from Products.CMFCore.permissions import setDefaultRoles |
---|
| 27 | security = ModuleSecurityInfo('Products.WAeUP.WAeUPPermissions') |
---|
| 28 | |
---|
[80] | 29 | # - 'University Manage' : Permission you need to manage a University |
---|
[19] | 30 | # |
---|
[84] | 31 | security.declarePublic('UniversityManage') |
---|
| 32 | UniversityManage = "University Manage" |
---|
| 33 | setDefaultRoles(UniversityManage, ('Manager', |
---|
[167] | 34 | )) |
---|
[84] | 35 | # - 'Student Manage' : Permission you need to manage Students |
---|
| 36 | # |
---|
| 37 | security.declarePublic('StudentManage') |
---|
| 38 | StudentManage = "Student Manage" |
---|
| 39 | setDefaultRoles(StudentManage, ('Manager', |
---|
[152] | 40 | 'UniversityManager', |
---|
| 41 | 'StudentManager', |
---|
[84] | 42 | 'FacultyManager', |
---|
| 43 | 'Owner',)) |
---|
[80] | 44 | # - 'Faculty Manage' : Permission you need to manage a Faculty |
---|
[19] | 45 | # |
---|
[84] | 46 | security.declarePublic('FacultyManage') |
---|
| 47 | FacultyManage = "Faculty Manage" |
---|
| 48 | setDefaultRoles(FacultyManage, ('Manager', |
---|
[152] | 49 | 'UniversityManager', |
---|
[84] | 50 | 'FacultyManager', |
---|
[152] | 51 | )) |
---|
[80] | 52 | # - 'Department Manage' : Permission you need to manage a Department |
---|
| 53 | # |
---|
[84] | 54 | security.declarePublic('DepartmentManage') |
---|
| 55 | DepartmentManage = "Department Manage" |
---|
| 56 | setDefaultRoles(DepartmentManage, ('Manager', |
---|
[152] | 57 | 'UniversityManager', |
---|
[84] | 58 | 'FacultyManager', |
---|
[152] | 59 | 'DepartmentManager', |
---|
| 60 | )) |
---|
[84] | 61 | # - 'Course Manage' : Permission you need to manage a Department |
---|
| 62 | # |
---|
| 63 | security.declarePublic('CourseManage') |
---|
| 64 | CourseManage = "Course Manage" |
---|
| 65 | setDefaultRoles(CourseManage, ('Manager', |
---|
[152] | 66 | 'UniversityManager', |
---|
| 67 | 'FacultyManager', |
---|
| 68 | 'DepartmentManager', |
---|
| 69 | 'CourseManager', |
---|
| 70 | )) |
---|
[19] | 71 | |
---|