Changeset 10248 for main/waeup.kofa/trunk/src
- Timestamp:
- 29 May 2013, 06:46:54 (12 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/permissions.py
r10246 r10248 86 86 grok.name('waeup.local.DepartmentManager') 87 87 grok.title(u'Department Manager') 88 grok.permissions('waeup.manageAcademics','waeup.showStudents') 88 grok.permissions('waeup.manageAcademics', 89 'waeup.showStudents', 90 'waeup.exportData') 89 91 90 92 class ClearanceOfficer(grok.Role): … … 94 96 grok.name('waeup.local.ClearanceOfficer') 95 97 grok.title(u'Clearance Officer') 96 grok.permissions('waeup.showStudents', 'waeup.viewAcademics') 98 grok.permissions('waeup.showStudents', 99 'waeup.viewAcademics', 100 'waeup.exportData') 97 101 98 102 class UGClearanceOfficer(grok.Role): … … 102 106 grok.name('waeup.local.UGClearanceOfficer') 103 107 grok.title(u'UG Clearance Officer') 104 grok.permissions('waeup.showStudents', 'waeup.viewAcademics') 108 grok.permissions('waeup.showStudents', 109 'waeup.viewAcademics', 110 'waeup.exportData') 105 111 106 112 class PGClearanceOfficer(grok.Role): … … 110 116 grok.name('waeup.local.PGClearanceOfficer') 111 117 grok.title(u'PG Clearance Officer') 112 grok.permissions('waeup.showStudents', 'waeup.viewAcademics') 118 grok.permissions('waeup.showStudents', 119 'waeup.viewAcademics', 120 'waeup.exportData') 113 121 114 122 class CourseAdviser100(grok.Role): … … 118 126 grok.name('waeup.local.CourseAdviser100') 119 127 grok.title(u'Course Adviser 100L') 120 grok.permissions('waeup.showStudents', 'waeup.viewAcademics') 128 grok.permissions('waeup.showStudents', 129 'waeup.viewAcademics', 130 'waeup.exportData') 121 131 122 132 class CourseAdviser200(grok.Role): … … 126 136 grok.name('waeup.local.CourseAdviser200') 127 137 grok.title(u'Course Adviser 200L') 128 grok.permissions('waeup.showStudents', 'waeup.viewAcademics') 138 grok.permissions('waeup.showStudents', 139 'waeup.viewAcademics', 140 'waeup.exportData') 129 141 130 142 class CourseAdviser300(grok.Role): … … 134 146 grok.name('waeup.local.CourseAdviser300') 135 147 grok.title(u'Course Adviser 300L') 136 grok.permissions('waeup.showStudents', 'waeup.viewAcademics') 148 grok.permissions('waeup.showStudents', 149 'waeup.viewAcademics', 150 'waeup.exportData') 137 151 138 152 class CourseAdviser400(grok.Role): … … 142 156 grok.name('waeup.local.CourseAdviser400') 143 157 grok.title(u'Course Adviser 400L') 144 grok.permissions('waeup.showStudents', 'waeup.viewAcademics') 158 grok.permissions('waeup.showStudents', 159 'waeup.viewAcademics', 160 'waeup.exportData') 145 161 146 162 class CourseAdviser500(grok.Role): … … 150 166 grok.name('waeup.local.CourseAdviser500') 151 167 grok.title(u'Course Adviser 500L') 152 grok.permissions('waeup.showStudents', 'waeup.viewAcademics') 168 grok.permissions('waeup.showStudents', 169 'waeup.viewAcademics', 170 'waeup.exportData') 153 171 154 172 class CourseAdviser600(grok.Role): … … 158 176 grok.name('waeup.local.CourseAdviser600') 159 177 grok.title(u'Course Adviser 600L') 160 grok.permissions('waeup.showStudents', 'waeup.viewAcademics') 178 grok.permissions('waeup.showStudents', 179 'waeup.viewAcademics', 180 'waeup.exportData') 161 181 162 182 class CourseAdviser700(grok.Role): … … 166 186 grok.name('waeup.local.CourseAdviser700') 167 187 grok.title(u'Course Adviser 700L') 168 grok.permissions('waeup.showStudents', 'waeup.viewAcademics') 188 grok.permissions('waeup.showStudents', 189 'waeup.viewAcademics', 190 'waeup.exportData') 169 191 170 192 class CourseAdviser800(grok.Role): … … 174 196 grok.name('waeup.local.CourseAdviser800') 175 197 grok.title(u'Course Adviser 800L') 176 grok.permissions('waeup.showStudents', 'waeup.viewAcademics') 198 grok.permissions('waeup.showStudents', 199 'waeup.viewAcademics', 200 'waeup.exportData') 177 201 178 202 class Lecturer(grok.Role): … … 182 206 grok.name('waeup.local.Lecturer') 183 207 grok.title(u'Lecturer') 184 grok.permissions('waeup.showStudents', 'waeup.viewAcademics') 208 grok.permissions('waeup.showStudents', 209 'waeup.viewAcademics', 210 'waeup.exportData') 185 211 186 212 class Owner(grok.Role): -
main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py
r10247 r10248 2875 2875 def _set_exporter_values(self): 2876 2876 # We provide all student exporters, nothing else, yet. 2877 # Bursary Officers don't have the general exportData permission 2878 # and are only allowed to export bursary data. 2879 if not checkPermission('waeup.exportData', self.context): 2880 self.exporters = [('Bursary Data', 'bursary')] 2881 return 2877 2882 exporters = [] 2878 2883 for name in EXPORTER_NAMES: … … 2947 2952 """ 2948 2953 grok.context(VirtualFacultiesExportJobContainer) 2949 2950 def _set_exporter_values(self):2951 # Only Bursary Officers will use this export. They must2952 # not be allowed to export regular student data at faculties level2953 self.exporters = [('Bursary Data', 'bursary')]2954 return2955 2954 2956 2955 class DepartmentExportJobContainerJobConfig(ExportJobContainerJobConfig): -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py
r10247 r10248 2886 2886 self.browser.getControl("Configure new export").click() 2887 2887 # Only the bursary exporter us available ot this level 2888 self.assertFalse('<option value="students">' in self.browser.contents)2889 self.assertTrue('<option value="bursary">' in self.browser.contents)2888 #self.assertFalse('<option value="students">' in self.browser.contents) 2889 #self.assertTrue('<option value="bursary">' in self.browser.contents) 2890 2890 self.browser.getControl(name="exporter").value = ['bursary'] 2891 2891 self.browser.getControl(name="session").value = ['2004']
Note: See TracChangeset for help on using the changeset viewer.