Changeset 8367 for main/waeup.kofa/trunk/src
- Timestamp:
- 6 May 2012, 11:19:38 (13 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/applicants/permissions.py
r7250 r8367 46 46 grok.title(u'Application Owner') 47 47 grok.permissions('waeup.handleApplication', 'waeup.viewApplication', 48 'waeup. Authenticated', 'waeup.payApplicant')48 'waeup.payApplicant') 49 49 50 50 # Site role … … 52 52 class ApplicantRole(grok.Role): 53 53 grok.name('waeup.Applicant') 54 grok.permissions('waeup.viewAcademics', 'waeup.viewMyApplicationDataTab') 54 grok.permissions('waeup.viewAcademics', 'waeup.viewMyApplicationDataTab', 55 'waeup.Authenticated') 55 56 56 57 class ApplicationsOfficer(grok.Role): 57 58 grok.name('waeup.ApplicationsOfficer') 58 59 grok.title(u'Applications Officer') 59 grok.permissions('waeup.manageApplication', 'waeup.viewApplication' 60 grok.permissions('waeup.manageApplication', 'waeup.viewApplication', 60 61 'waeup.viewApplicantsTab', 'waeup.payApplicant') -
main/waeup.kofa/trunk/src/waeup/kofa/browser/pages.py
r8366 r8367 311 311 grok.name('administration') 312 312 grok.context(IUniversity) 313 grok.require('waeup.manage University')313 grok.require('waeup.managePortal') 314 314 label = _(u'Administration') 315 315 pnav = 0 … … 356 356 grok.context(IUniversity) 357 357 grok.name('reindex') 358 grok.require('waeup.manage University')358 grok.require('waeup.managePortal') 359 359 360 360 def update(self,ctlg=None): … … 594 594 grok.name('search') 595 595 grok.template('searchpage') 596 grok.require('waeup. manageUniversity')596 grok.require('waeup.viewAcademics') 597 597 label = _(u"Search Academic Section") 598 598 pnav = 1 … … 863 863 grok.name('import1') 864 864 grok.template('datacenterimport1page') 865 grok.require('waeup. manageDataCenter')865 grok.require('waeup.importData') 866 866 label = _(u'Process CSV file') 867 867 pnav = 0 … … 893 893 grok.name('import2') 894 894 grok.template('datacenterimport2page') 895 grok.require('waeup. manageDataCenter')895 grok.require('waeup.importData') 896 896 label = _(u'Process CSV file') 897 897 pnav = 0 … … 1013 1013 grok.name('import3') 1014 1014 grok.template('datacenterimport3page') 1015 grok.require('waeup. manageDataCenter')1015 grok.require('waeup.importData') 1016 1016 label = _(u'Process CSV file') 1017 1017 pnav = 0 … … 1121 1121 grok.name('import4') 1122 1122 grok.template('datacenterimport4page') 1123 grok.require('waeup. manageDataCenter')1123 grok.require('waeup.importData') 1124 1124 label = _(u'Process CSV file') 1125 1125 pnav = 0 … … 1178 1178 grok.name('logs') 1179 1179 grok.template('datacenterlogspage') 1180 grok.require('waeup.manage University')1180 grok.require('waeup.manageDataCenter') 1181 1181 label = _(u'Show logfiles') 1182 1182 pnav = 0 … … 1200 1200 grok.name('show') 1201 1201 grok.template('datacenterlogsshowfilepage') 1202 grok.require('waeup.manage University')1202 grok.require('waeup.manageDataCenter') 1203 1203 title = _(u'Data Center') 1204 1204 pnav = 0 … … 1275 1275 grok.name('export') 1276 1276 grok.template('datacenterexportpage') 1277 grok.require('waeup.manage University')1277 grok.require('waeup.manageDataCenter') 1278 1278 label = _('Download portal data as CSV file') 1279 1279 pnav = 0 … … 1302 1302 grok.context(IDataCenter) 1303 1303 grok.name('export.csv') 1304 grok.require('waeup.manage University')1304 grok.require('waeup.manageDataCenter') 1305 1305 1306 1306 def render(self, exporter=None): … … 1318 1318 """ 1319 1319 grok.name('export.xml') 1320 grok.require('waeup.manage University')1320 grok.require('waeup.managePortal') 1321 1321 1322 1322 def render(self): … … 1335 1335 """ 1336 1336 grok.name('importxml') 1337 grok.require('waeup.manage University')1337 grok.require('waeup.managePortal') 1338 1338 1339 1339 def update(self, xmlfile=None, CANCEL=None, SUBMIT=None): … … 1378 1378 grok.context(IFacultiesContainer) 1379 1379 grok.name('manage') 1380 grok.require('waeup.manage University')1380 grok.require('waeup.manageAcademics') 1381 1381 grok.template('facultiescontainermanagepage') 1382 1382 pnav = 1 … … 1412 1412 """ 1413 1413 grok.context(IFacultiesContainer) 1414 grok.require('waeup.manage University')1414 grok.require('waeup.manageAcademics') 1415 1415 grok.name('add') 1416 1416 label = _('Add faculty') … … 1453 1453 grok.context(IFaculty) 1454 1454 grok.name('manage') 1455 grok.require('waeup.manage University')1455 grok.require('waeup.manageAcademics') 1456 1456 grok.template('facultymanagepage') 1457 1457 pnav = 1 … … 1527 1527 grok.context(IFaculty) 1528 1528 grok.name('add') 1529 grok.require('waeup.manage University')1529 grok.require('waeup.manageAcademics') 1530 1530 label = _('Add department') 1531 1531 form_fields = grok.AutoFields(IDepartmentAdd) … … 1621 1621 grok.context(IDepartment) 1622 1622 grok.name('manage') 1623 grok.require('waeup.manage University')1623 grok.require('waeup.manageAcademics') 1624 1624 pnav = 1 1625 1625 grok.template('departmentmanagepage') … … 1723 1723 grok.context(IDepartment) 1724 1724 grok.name('addcourse') 1725 grok.require('waeup.manage University')1725 grok.require('waeup.manageAcademics') 1726 1726 label = _(u'Add course') 1727 1727 form_fields = grok.AutoFields(ICourseAdd) … … 1760 1760 grok.context(IDepartment) 1761 1761 grok.name('addcertificate') 1762 grok.require('waeup.manage University')1762 grok.require('waeup.manageAcademics') 1763 1763 label = _(u'Add certificate') 1764 1764 form_fields = grok.AutoFields(ICertificateAdd) … … 1814 1814 grok.context(ICourse) 1815 1815 grok.name('manage') 1816 grok.require('waeup.manage University')1816 grok.require('waeup.manageAcademics') 1817 1817 label = _(u'Edit course') 1818 1818 pnav = 1 … … 1863 1863 grok.context(ICertificate) 1864 1864 grok.name('manage') 1865 grok.require('waeup.manage University')1865 grok.require('waeup.manageAcademics') 1866 1866 pnav = 1 1867 1867 label = _('Edit certificate') … … 1941 1941 grok.context(ICertificate) 1942 1942 grok.name('addcertificatecourse') 1943 grok.require('waeup.manage University')1943 grok.require('waeup.manageAcademics') 1944 1944 form_fields = grok.AutoFields(ICertificateCourseAdd) 1945 1945 pnav = 1 … … 1990 1990 grok.context(ICertificateCourse) 1991 1991 grok.name('manage') 1992 grok.require('waeup.manage University')1992 grok.require('waeup.manageAcademics') 1993 1993 form_fields = grok.AutoFields(ICertificateCourse) 1994 1994 label = _('Edit course referrer') -
main/waeup.kofa/trunk/src/waeup/kofa/browser/viewlets.py
r8197 r8367 155 155 grok.baseclass() 156 156 grok.order(2) 157 grok.require('waeup.manage University')157 grok.require('waeup.manageAcademics') 158 158 icon = 'actionicon_modify.png' 159 159 target = '@@manage' … … 165 165 grok.baseclass() 166 166 grok.order(4) 167 grok.require('waeup.manage University')167 grok.require('waeup.manageAcademics') 168 168 icon = 'actionicon_add.png' 169 169 target = 'add' … … 175 175 grok.baseclass() 176 176 grok.order(4) 177 grok.require('waeup.manage University')177 grok.require('waeup.manageAcademics') 178 178 icon = 'actionicon_delete.png' 179 179 target = 'remove' … … 185 185 grok.baseclass() 186 186 grok.order(5) 187 grok.require('waeup.manage University')187 grok.require('waeup.manageAcademics') 188 188 icon = 'actionicon_search.png' 189 189 target = 'search' … … 236 236 # #grok.view(Index) 237 237 # grok.order(98) 238 # grok.require('waeup.manage University')238 # grok.require('waeup.managePortal') 239 239 240 240 #class ImportXMLAction(grok.Viewlet): … … 242 242 # #grok.view(Index) 243 243 # grok.order(99) 244 # grok.require('waeup.manage University')244 # grok.require('waeup.managePortal') 245 245 # 246 246 # def update(self): … … 259 259 grok.context(IKofaObject) 260 260 grok.order(5) 261 grok.require('waeup.manage University')261 grok.require('waeup.manageAcademics') 262 262 icon = 'actionicon_modify.png' # File must exist in static/ 263 263 title = 'Text of link' … … 346 346 every page the user is allowed to go to, if the user has also the 347 347 permissions set by `grok.require()`. By default only users with 348 ``waeup.manage University`` permission will see links defined by348 ``waeup.manageAcademics`` permission will see links defined by 349 349 this or derivated classes. 350 350 """ … … 523 523 grok.template('actionbutton') 524 524 grok.viewletmanager(ActionBar) 525 grok.require('waeup.manage University')525 grok.require('waeup.manageAcademics') 526 526 icon = 'actionicon_manage.png' # File must exist in static/ 527 527 target = '@@show' # link to this viewname. … … 542 542 grok.context(IDataCenter) 543 543 grok.view(DatacenterPage) 544 grok.require('waeup. manageUniversity')544 grok.require('waeup.importData') 545 545 grok.order(6) 546 546 icon = 'actionicon_gear.png' … … 551 551 grok.context(IDataCenter) 552 552 grok.view(DatacenterPage) 553 grok.require('waeup.manage University')553 grok.require('waeup.manageDataCenter') 554 554 grok.order(5) 555 555 icon = 'actionicon_up.png' … … 560 560 grok.context(IDataCenter) 561 561 grok.view(DatacenterPage) 562 grok.require('waeup.manage University')562 grok.require('waeup.manageDataCenter') 563 563 grok.order(7) 564 564 icon = 'actionicon_down.png' … … 657 657 grok.order(1) 658 658 grok.viewletmanager(AdministrationTasks) 659 grok.require('waeup.manage University')659 grok.require('waeup.managePortal') 660 660 grok.template('admintask') 661 661 … … 765 765 grok.viewletmanager(SubobjectLister) 766 766 grok.context(IFaculty) 767 grok.require('waeup.manage University')767 grok.require('waeup.manageAcademics') 768 768 769 769 def render(self): -
main/waeup.kofa/trunk/src/waeup/kofa/frontpage.html
r8363 r8367 1 <h1>Welcome to WAeUP.Kofa ,1 <h1>Welcome to WAeUP.Kofa 2 2 <br> 3 3 <small> -
main/waeup.kofa/trunk/src/waeup/kofa/permissions.py
r8068 r8367 47 47 grok.name('waeup.viewAcademics') 48 48 49 class ManageUniversity(grok.Permission): 50 grok.name('waeup.manageUniversity') 49 class ManageAcademicsPermission(grok.Permission): 50 grok.name('waeup.manageAcademics') 51 52 class ManagePortal(grok.Permission): 53 grok.name('waeup.managePortal') 51 54 52 55 class ManageUsers(grok.Permission): … … 61 64 class ManageDataCenter(grok.Permission): 62 65 grok.name('waeup.manageDataCenter') 66 67 class ImportData(grok.Permission): 68 grok.name('waeup.importData') 63 69 64 70 class ManagePortalConfiguration(grok.Permission): … … 72 78 grok.name('waeup.local.DepartmentManager') 73 79 grok.title(u'Department Manager') 74 grok.permissions('waeup.manage University','waeup.showStudents')80 grok.permissions('waeup.manageAcademics','waeup.showStudents') 75 81 76 82 class ClearanceOfficer(grok.Role): … … 141 147 grok.permissions('waeup.viewAcademics') 142 148 149 class AcademicsManager(grok.Role): 150 grok.name('waeup.AcademicsManager') 151 grok.title(u'Academics Manager') 152 grok.permissions('waeup.viewAcademics', 153 'waeup.manageAcademics') 154 143 155 class ACManager(grok.Role): 144 156 grok.name('waeup.ACManager') … … 146 158 grok.permissions('waeup.manageACBatches') 147 159 160 class DataCenterManager(grok.Role): 161 grok.name('waeup.DataCenterManager') 162 grok.title(u'Datacenter Manager') 163 grok.permissions('waeup.manageDataCenter') 164 165 class ImportManager(grok.Role): 166 grok.name('waeup.ImportManager') 167 grok.title(u'Import Manager') 168 grok.permissions('waeup.manageDataCenter', 169 'waeup.importData') 170 171 class UsersManager(grok.Role): 172 grok.name('waeup.UsersManager') 173 grok.title(u'Users Manager') 174 grok.permissions('waeup.manageUsers') 175 148 176 class PortalManager(grok.Role): 149 177 grok.name('waeup.PortalManager') 150 178 grok.title(u'Portal Manager') 151 grok.permissions('waeup.manageUniversity', 'waeup.manageUsers', 152 'waeup.viewAcademics', 'waeup.manageACBatches', 179 grok.permissions('waeup.managePortal', 'waeup.manageUsers', 180 'waeup.viewAcademics', 'manageAcademics', 181 'waeup.manageACBatches', 153 182 'waeup.manageDataCenter','waeup.managePortalSettings', 183 'waeup.importData', 154 184 'waeup.managePortalConfiguration', 'waeup.viewApplication', 155 185 'waeup.manageApplication', 'waeup.handleApplication', -
main/waeup.kofa/trunk/src/waeup/kofa/permissions.txt
r7819 r8367 39 39 >>> from waeup.kofa.permissions import get_waeup_roles 40 40 >>> len(list(get_waeup_roles())) 41 1 141 15 42 42 43 43 >>> len(list(get_waeup_roles(also_local=True))) 44 2 244 26 45 45 46 46 … … 54 54 >>> list(get_waeup_role_names()) 55 55 [u'waeup.ACManager', 56 u'waeup.AcademicsManager', 56 57 u'waeup.AcademicsOfficer', 57 58 u'waeup.AccommodationOfficer', 58 59 u'waeup.Applicant', 59 60 u'waeup.ApplicationsOfficer', 61 u'waeup.DataCenterManager', 62 u'waeup.ImportManager', 60 63 u'waeup.PortalManager', 61 64 u'waeup.Student', … … 63 66 u'waeup.StudentsCourseAdviser', 64 67 u'waeup.StudentsManager', 65 u'waeup.StudentsOfficer'] 68 u'waeup.StudentsOfficer', 69 u'waeup.UsersManager'] 66 70 67 71 :func:`get_users_with_local_roles` -
main/waeup.kofa/trunk/src/waeup/kofa/students/permissions.py
r7334 r8367 62 62 grok.permissions('waeup.handleStudent', 'waeup.uploadStudentFile', 63 63 'waeup.viewStudent', 'waeup.payStudent', 64 'waeup.handleAccommodation' , 'waeup.Authenticated')64 'waeup.handleAccommodation') 65 65 66 66 # Site Roles 67 67 class StudentRole(grok.Role): 68 68 grok.name('waeup.Student') 69 grok.permissions('waeup.viewAcademics', 'waeup.viewMyStudentDataTab') 69 grok.permissions('waeup.viewAcademics', 'waeup.viewMyStudentDataTab', 70 'waeup.Authenticated') 70 71 71 72 class StudentsOfficer(grok.Role): … … 78 79 grok.name('waeup.StudentsManager') 79 80 grok.title(u'Students Manager') 80 grok.permissions('waeup.viewStudent', 'waeup.manageStudent', 81 grok.permissions('waeup.viewStudent', 'waeup.viewStudents', 82 'waeup.manageStudent', 'waeup.viewStudentsContainer', 81 83 'waeup.payStudent', 'waeup.uploadStudentFile', 82 'waeup. handleAccommodation', 'waeup.viewStudents')84 'waeup.viewStudentsTab', 'waeup.handleAccommodation') 83 85 84 86 class StudentsClearanceOfficer(grok.Role): -
main/waeup.kofa/trunk/src/waeup/kofa/university/certificatescontainer.py
r7811 r8367 46 46 """ 47 47 grok.implements(ICertificatesContainer) 48 grok.require('waeup.manageUniversity')49 48 50 49 def __setitem__(self, name, certificate): -
main/waeup.kofa/trunk/src/waeup/kofa/university/certificatescontainer.txt
r7819 r8367 21 21 22 22 .. attribute:: grok.implements(ICertificatesContainer) 23 24 .. attribute:: grok.require('waeup.manageUniversity')25 23 26 24 :class:`CertificatesContainer` instances are instances of -
main/waeup.kofa/trunk/src/waeup/kofa/university/coursescontainer.py
r7811 r8367 30 30 """ 31 31 grok.implements(ICoursesContainer) 32 grok.require('waeup.manageUniversity')33 32 34 33 def __setitem__(self, name, course): -
main/waeup.kofa/trunk/src/waeup/kofa/university/coursescontainer.txt
r7819 r8367 21 21 22 22 .. attribute:: grok.implements(ICoursesContainer) 23 24 .. attribute:: grok.require('waeup.manageUniversity')25 23 26 24 :class:`CoursesContainer` instances are instances of -
main/waeup.kofa/trunk/src/waeup/kofa/university/facultiescontainer.py
r7819 r8367 26 26 """ 27 27 grok.implements(IFacultiesContainer) 28 grok.require('waeup.manageUniversity')29 28 30 29 def addFaculty(self, faculty):
Note: See TracChangeset for help on using the changeset viewer.