Changeset 10347
- Timestamp:
- 22 Jun 2013, 17:01:32 (11 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/browser/tests/test_browser.py
r10258 r10347 257 257 258 258 def test_export_accesscodes(self): 259 # Create portal manager and CCOfficer260 self.app['users'].addUser('mr manager', 'mrmanagersecret')261 self.app['users']['mr manager'].email = 'mrmanager@foo.ng'262 self.app['users']['mr manager'].title = 'Carlo Pitter'259 # Create portal manager and an ExportManager 260 self.app['users'].addUser('mrportal', 'mrportalsecret') 261 self.app['users']['mrportal'].email = 'mrportal@foo.ng' 262 self.app['users']['mrportal'].title = 'Carlo Pitter' 263 263 # Assign PortalManager role 264 264 prmlocal = IPrincipalRoleManager(self.app) 265 prmlocal.assignRoleToPrincipal('waeup.PortalManager', 'mr manager')266 self.app['users'].addUser('mr officer', 'mrofficersecret')267 self.app['users']['mr officer'].email = 'mrofficer@foo.ng'268 self.app['users']['mr officer'].title = 'Carlos Potter'269 # Assign CCOfficer role270 prmlocal.assignRoleToPrincipal('waeup. CCOfficer', 'mrofficer')265 prmlocal.assignRoleToPrincipal('waeup.PortalManager', 'mrportal') 266 self.app['users'].addUser('mrexporter', 'mrexportersecret') 267 self.app['users']['mrexporter'].email = 'mrexporter@foo.ng' 268 self.app['users']['mrexporter'].title = 'Carlos Potter' 269 # Assign ExportManager role 270 prmlocal.assignRoleToPrincipal('waeup.ExportManager', 'mrexporter') 271 271 272 272 # Login as portal manager 273 273 self.browser.open('http://localhost/app/login') 274 self.browser.getControl(name="form.login").value = 'mr manager'275 self.browser.getControl(name="form.password").value = 'mr managersecret'274 self.browser.getControl(name="form.login").value = 'mrportal' 275 self.browser.getControl(name="form.password").value = 'mrportalsecret' 276 276 self.browser.getControl("Login").click() 277 277 … … 299 299 # Login as officer who is not allowed to download accesscodes 300 300 self.browser.open('http://localhost/app/login') 301 self.browser.getControl(name="form.login").value = 'mr officer'302 self.browser.getControl(name="form.password").value = 'mr officersecret'301 self.browser.getControl(name="form.login").value = 'mrexporter' 302 self.browser.getControl(name="form.password").value = 'mrexportersecret' 303 303 self.browser.getControl("Login").click() 304 304 305 305 self.browser.open(self.datacenter_path + '/export') 306 # The CC Officer can see the accesscodebatches exporter ...306 # The Export Manager can see the accesscodebatches exporter ... 307 307 self.assertTrue( 308 308 '<option value="accesscodebatches">' in self.browser.contents) -
main/waeup.kofa/trunk/src/waeup/kofa/permissions.txt
r10279 r10347 39 39 >>> from waeup.kofa.permissions import get_waeup_roles 40 40 >>> len(list(get_waeup_roles())) 41 2 341 22 42 42 43 43 >>> len(list(get_waeup_roles(also_local=True))) 44 4 144 40 45 45 46 46 … … 61 61 u'waeup.ApplicationsOfficer', 62 62 u'waeup.BursaryOfficer', 63 u'waeup.CCOfficer',64 63 u'waeup.DataCenterManager', 65 64 u'waeup.ExportManager',
Note: See TracChangeset for help on using the changeset viewer.