Changeset 7181 for main/waeup.sirp/trunk
- Timestamp:
- 24 Nov 2011, 05:52:34 (13 years ago)
- Location:
- main/waeup.sirp/trunk/src/waeup/sirp
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/accesscodes/accesscode.py
r7137 r7181 19 19 ) 20 20 from waeup.sirp.accesscodes.workflow import DISABLED, USED 21 22 class ManageACBatches(grok.Permission):23 grok.name('waeup.manageACBatches')24 21 25 22 class AccessCode(grok.Model): -
main/waeup.sirp/trunk/src/waeup/sirp/permissions.py
r7178 r7181 41 41 grok.name('waeup.managePortalConfiguration') 42 42 43 class ManageACBatches(grok.Permission): 44 grok.name('waeup.manageACBatches') 45 43 46 # Local Roles 44 47 class DepartmentOfficer(grok.Role): … … 72 75 grok.title(u'Portal User') 73 76 grok.permissions('waeup.View', 'waeup.Public') 77 78 class ACManager(grok.Role): 79 grok.name('waeup.ACManager') 80 grok.title(u'Access Code Manager') 81 grok.permissions('waeup.manageACBatches') 74 82 75 83 class PortalManager(grok.Role): -
main/waeup.sirp/trunk/src/waeup/sirp/permissions.txt
r7177 r7181 29 29 30 30 >>> sorted(list(getAllRoles())) 31 [(u'waeup.A ccommodationOfficer', <waeup.sirp.hostels.permissions.AccommodationOfficer object at 0x...]31 [(u'waeup.ACManager', <waeup.sirp.permissions.ACManager object at 0x...] 32 32 33 33 :func:`getWAeUPRoles` … … 39 39 >>> from waeup.sirp.permissions import getWAeUPRoles 40 40 >>> len(list(getWAeUPRoles())) 41 941 10 42 42 43 43 >>> len(list(getWAeUPRoles(also_local=True))) 44 1 544 16 45 45 46 46 … … 53 53 >>> from waeup.sirp.permissions import getWAeUPRoleNames 54 54 >>> list(getWAeUPRoleNames()) 55 [u'waeup.A ccommodationOfficer', u'waeup.Applicant',55 [u'waeup.ACManager', u'waeup.AccommodationOfficer', u'waeup.Applicant', 56 56 u'waeup.ApplicationsOfficer', 57 57 u'waeup.PortalManager', u'waeup.PortalUser', u'waeup.Student', -
main/waeup.sirp/trunk/src/waeup/sirp/students/browser.py
r7171 r7181 948 948 grok.context(IStudentPaymentsContainer) 949 949 grok.name('index') 950 grok.require('waeup. handleStudent')950 grok.require('waeup.payStudent') 951 951 form_fields = grok.AutoFields(IStudentPaymentsContainer) 952 952 grok.template('paymentsmanagepage') … … 1018 1018 grok.context(IStudentPaymentsContainer) 1019 1019 grok.name('addop') 1020 grok.require('waeup. handleStudent')1020 grok.require('waeup.payStudent') 1021 1021 form_fields = grok.AutoFields(IStudentOnlinePayment).select( 1022 1022 'p_category') … … 1110 1110 grok.context(IStudentOnlinePayment) 1111 1111 grok.view(OnlinePaymentDisplayFormPage) 1112 grok.require('waeup. handleStudent')1112 grok.require('waeup.payStudent') 1113 1113 icon = 'actionicon_call.png' 1114 1114 text = 'Request callback' … … 1218 1218 grok.context(IStudentAccommodation) 1219 1219 grok.name('index') 1220 grok.require('waeup.handle Student')1220 grok.require('waeup.handleAccommodation') 1221 1221 form_fields = grok.AutoFields(IStudentAccommodation) 1222 1222 grok.template('accommodationmanagepage') … … 1283 1283 grok.context(IStudentAccommodation) 1284 1284 grok.view(AccommodationManageFormPage) 1285 grok.require('waeup.handle Student')1285 grok.require('waeup.handleAccommodation') 1286 1286 icon = 'actionicon_home.png' 1287 1287 text = 'Book accommodation' … … 1293 1293 grok.context(IStudentAccommodation) 1294 1294 grok.name('add') 1295 grok.require('waeup.handle Student')1295 grok.require('waeup.handleAccommodation') 1296 1296 grok.template('enterpin') 1297 1297 ac_prefix = 'HOS' … … 1384 1384 grok.context(IBedTicket) 1385 1385 grok.name('index') 1386 grok.require('waeup. viewStudent')1386 grok.require('waeup.handleAccommodation') 1387 1387 form_fields = grok.AutoFields(IBedTicket) 1388 1388 form_fields[ … … 1402 1402 grok.context(IBedTicket) 1403 1403 grok.view(BedTicketDisplayFormPage) 1404 grok.require('waeup. viewStudent')1404 grok.require('waeup.handleAccommodation') 1405 1405 icon = 'actionicon_pdf.png' 1406 1406 text = 'Download bed allocation slip' … … 1412 1412 grok.context(IBedTicket) 1413 1413 grok.name('bed_allocation.pdf') 1414 grok.require('waeup. viewStudent')1414 grok.require('waeup.handleAccommodation') 1415 1415 form_fields = grok.AutoFields(IBedTicket) 1416 1416 form_fields['booking_date'].custom_widget = FriendlyDateDisplayWidget('le') -
main/waeup.sirp/trunk/src/waeup/sirp/students/permissions.py
r7178 r7181 30 30 grok.name('waeup.payStudent') 31 31 32 class HandleAccommodation(grok.Permission): 33 grok.name('waeup.handleAccommodation') 34 32 35 class UploadStudentFile(grok.Permission): 33 36 grok.name('waeup.uploadStudentFile') … … 44 47 grok.title(u'Student Record Owner') 45 48 grok.permissions('waeup.handleStudent', 'waeup.uploadStudentFile', 46 'waeup.viewStudent', 'waeup.payStudent') 49 'waeup.viewStudent', 'waeup.payStudent', 50 'waeup.handleAccommodation') 47 51 48 52 # Site Roles … … 60 64 grok.title(u'Students Manager') 61 65 grok.permissions('waeup.viewStudent', 'waeup.manageStudent', 62 'waeup.payStudent', 'waeup.uploadStudentFile') 66 'waeup.payStudent', 'waeup.uploadStudentFile', 67 'waeup.handleAccommodation') 63 68 64 69 class StudentsClearanceOfficer(grok.Role): -
main/waeup.sirp/trunk/src/waeup/sirp/students/viewlets.py
r7136 r7181 63 63 class StudentManagePaymentsLink(StudentManageLink): 64 64 grok.order(4) 65 grok.require('waeup.payStudent') 65 66 link = 'payments' 66 67 text = u'Payments' … … 68 69 class StudentManageAccommodationLink(StudentManageLink): 69 70 grok.order(5) 71 grok.require('waeup.handleAccommodation') 70 72 link = 'accommodation' 71 73 text = u'Accommodation Data'
Note: See TracChangeset for help on using the changeset viewer.