Changeset 12847 for main/waeup.kofa/trunk/src/waeup/kofa/students
- Timestamp:
- 3 Apr 2015, 17:45:48 (10 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/students
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/permissions.py
r12843 r12847 24 24 25 25 class HandleStudent(grok.Permission): 26 """ 27 The HandleStudent permission is reserved for students. 28 Students 'handle' their data. Officers 'manage' the data. 29 """ 26 30 grok.name('waeup.handleStudent') 27 31 28 32 class ViewStudent(grok.Permission): 33 """ 34 The ViewStudent permission allows to view all student data. 35 """ 29 36 grok.name('waeup.viewStudent') 30 37 … … 33 40 34 41 class ViewStudentsContainer(grok.Permission): 42 """The ViewStudentsContainer permission allows to view the students root 43 container page. 44 """ 35 45 grok.name('waeup.viewStudentsContainer') 36 46 37 47 class PayStudent(grok.Permission): 48 """The PayStudent permission allows to add an online payment ticket and to 49 manage tickets. 50 """ 38 51 grok.name('waeup.payStudent') 39 52 40 53 class HandleAccommodation(grok.Permission): 54 """The HandleAccommodation allows to manage bed tickets. 55 """ 41 56 grok.name('waeup.handleAccommodation') 42 57 43 58 class UploadStudentFile(grok.Permission): 59 """The UploadStudentFile permissions allows to upload the passport picture. 60 The respective page additionally checks the state of the student. 61 """ 44 62 grok.name('waeup.uploadStudentFile') 45 63 46 64 class ManageStudent(grok.Permission): 65 """The ManageStudent permission allows to edit the data. 66 This permission is meant for clearance officers. 67 """ 47 68 grok.name('waeup.manageStudent') 48 69 49 70 class ClearStudent(grok.Permission): 71 """The ClearStudent permission is needed to clear students 72 or to reject clearance. This permission is meant for course advisers. 73 """ 50 74 grok.name('waeup.clearStudent') 51 75 52 76 class ValidateStudent(grok.Permission): 77 """The ValidateStudent permission is needed to validate or reject 78 course lists. This permission is not needed if users 79 already have the TriggerTransition permission. 80 """ 53 81 grok.name('waeup.validateStudent') 54 82 55 83 class EditStudyLevel(grok.Permission): 84 """The EditStudyLevel permission is needed for editing course lists. 85 Students and course advisers do have this permission. 86 """ 56 87 grok.name('waeup.editStudyLevel') 57 88 58 89 class LoginAsStudent(grok.Permission): 90 """The LoginAsStudent is needed to set temporary student passwords 91 and login as (impersonate) students. 92 """ 59 93 grok.name('waeup.loginAsStudent') 60 94 61 95 # Local role 62 96 class StudentRecordOwner(grok.Role): 97 """A student 'owns' her/his student object and subobjects and 98 gains permissions to handle all data, upload a passport picture, 99 add payment tickets, create and edit course lists and handle accommodation. 100 """ 63 101 grok.name('waeup.local.StudentRecordOwner') 64 102 grok.title(u'Student Record Owner') … … 72 110 # Site Roles 73 111 class StudentRole(grok.Role): 112 """This role is dedicated to students only. 113 It defines the permissions a student gains portal-wide. 114 """ 74 115 grok.name('waeup.Student') 75 116 grok.title(u'Student (do not assign)') … … 79 120 80 121 class StudentsOfficer(grok.Role): 122 """The Students Officer is allowed to view all student data. 123 """ 81 124 grok.name('waeup.StudentsOfficer') 82 125 grok.title(u'Students Officer (view only)') … … 85 128 86 129 class StudentsManager(grok.Role): 130 """The Students Officer is allowed to edit all student data, to 131 create payment tickets, to handle bed tickets and to upload passport 132 pictures. 133 """ 87 134 grok.name('waeup.StudentsManager') 88 135 grok.title(u'Students Manager') … … 104 151 105 152 class StudentsClearanceOfficer(grok.Role): 153 """The global StudentsClearanceOfficer role enables users to view all 154 student data, to clear students and to reject clearance portal-wide. 155 Usually, this role is not assigned manually. 156 We are using the correspondent local role instead which assigns the 157 StudentsClearanceOfficer role dynamically. 158 """ 106 159 grok.name('waeup.StudentsClearanceOfficer') 107 160 grok.title(u'Clearance Officer (all students)') … … 110 163 111 164 class StudentsCourseAdviser(grok.Role): 165 """The global StudentsCourseAdviser role enables users to view all 166 student data, to edit, validate or reject course lists portal-wide. 167 Usually, this role is not assigned manually. 168 We are using the correspondent local role instead which assigns the 169 StudentsCourseAdviser role dynamically. 170 """ 112 171 grok.name('waeup.StudentsCourseAdviser') 113 172 grok.title(u'Course Adviser (all students)') … … 117 176 118 177 class StudentImpersonator(grok.Role): 178 """The Student Impersonator gains the LoginAsStudent permission, 179 nothing else, see description above. 180 """ 119 181 grok.name('waeup.StudentImpersonator') 120 182 grok.title(u'Student Impersonator') -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py
r12632 r12847 688 688 self.assertEqual(self.browser.headers['Content-Type'], 689 689 'application/pdf') 690 # We want to see the signature fields. 691 IWorkflowState(self.student).setState('cleared') 692 self.browser.open(self.student_path + '/clearance_slip.pdf') 693 self.assertEqual(self.browser.headers['Status'], '200 Ok') 694 self.assertEqual(self.browser.headers['Content-Type'], 695 'application/pdf') 696 path = os.path.join(samples_dir(), 'clearance_slip.pdf') 697 open(path, 'wb').write(self.browser.contents) 698 print "Sample PDF clearance_slip.pdf written to %s" % path 690 699 691 700 def test_manage_course_lists(self):
Note: See TracChangeset for help on using the changeset viewer.