Changeset 12523 for main/waeup.ikoba
- Timestamp:
- 30 Jan 2015, 11:09:08 (10 years ago)
- Location:
- main/waeup.ikoba/trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.ikoba/trunk/README.txt
r12520 r12523 85 85 Only approved customers can conclude contracts (see below). 86 86 87 Customers can register themselves. They need a valid email address fo self-registration.87 Customers can register themselves. They need a valid email address for self-registration. 88 88 89 89 … … 115 115 5. submitting the documents for verification, 116 116 6. linking the submitted documents on the contract form, 117 7. submitting the contract form for approval. 117 7. paying the contract fees, 118 8. submitting the contract form for approval. 118 119 119 120 A customer has to register first but must not wait for approval before s/he can add contracts. Only after registration the customer can proceed to the contracts section and add, pay and submit contracts. If documents have to be uploaded and attached to the contract, these documents must be at least submitted for verification. Otherwise they cannot be attached. This ensures that documents can't be modified after application (= submission of contracts). Thus, a new customer can register, add and submit documents and then add, pay and submit contracts in just one single session. -
main/waeup.ikoba/trunk/src/waeup/ikoba/browser/templates/loginpage.pt
r12039 r12523 2 2 <br /> 3 3 <div class="form-group"> 4 <label i18n:translate="" class="col-sm-2 control-label"> User Name or Id</label>4 <label i18n:translate="" class="col-sm-2 control-label">Identifier</label> 5 5 <div class="col-sm-10"> 6 6 <input name="form.login" type="text" class="form-control" id="login"> 7 <div class="hint" i18n:translate="identifier_hint">Customers can enter 8 either their customer id, registration number or email address. 9 Officers must enter their user name.</div> 7 10 </div> 8 11 </div> … … 11 14 <div class="col-sm-10"> 12 15 <input name="form.password" type="password" class="form-control" id="password"> 13 <font i18n:translate="" color="red"> Notice: User names, ids and passwords are case sensitive.</font>14 16 </div> 15 17 </div> 18 <br /> 16 19 <input type="hidden" name="camefrom" tal:attributes="value view/camefrom" /> 17 20 <input class="btn btn-primary" type="submit" name="SUBMIT" 18 21 tal:attributes="value view/login_button" /> 19 22 <br /><br /><br /> 23 <p> 24 All identifiers and passwords are case sensitive. 25 </p> 20 26 <p i18n:translate="login_trouble1">Don't forget to logout or exit your browser when you're done. 21 27 If you are having trouble logging in, make sure to enable cookies in your web browser. -
main/waeup.ikoba/trunk/src/waeup/ikoba/customers/authentication.py
r11997 r12523 1 ## $Id : authentication.py 10055 2013-04-04 15:12:43Z uli$1 ## $Id$ 2 2 ## 3 3 ## Copyright (C) 2014 Uli Fouquet & Henrik Bettermann … … 22 22 import time 23 23 from zope.component import getUtility 24 from zope.catalog.interfaces import ICatalog 24 25 from zope.password.interfaces import IPasswordManager 25 26 from zope.pluggableauth.interfaces import ( … … 187 188 customer = customerscontainer.get(login, None) 188 189 if customer is None: 189 return None 190 cat = getUtility(ICatalog, name='customers_catalog') 191 results = list( 192 cat.searchResults(email=(login, login))) 193 if len(results) != 1: 194 return None 195 customer = results[0] 190 196 return IUserAccount(customer) 191 197 -
main/waeup.ikoba/trunk/src/waeup/ikoba/customers/interfaces.py
r12521 r12523 227 227 email = TextLineChoice( 228 228 title = _(u'Email'), 229 required = False,229 required = True, 230 230 constraint=validate_email, 231 231 source = contextual_email_source, -
main/waeup.ikoba/trunk/src/waeup/ikoba/customers/tests/test_browser.py
r12521 r12523 550 550 # Tests for Customer class views and pages 551 551 552 def test_customer_login_with_email(self): 553 self.assertEqual(self.customer.state, 'created') 554 self.browser.open(self.login_path) 555 self.browser.getControl(name="form.login").value = self.customer.email 556 self.browser.getControl(name="form.password").value = 'cpwd' 557 self.browser.getControl("Login").click() 558 self.assertEqual(self.browser.url, self.customer_path) 559 self.assertTrue('You logged in' in self.browser.contents) 560 # Status has changed 561 self.assertEqual(self.customer.state, 'started') 562 return 563 552 564 def test_customer_change_password(self): 553 565 # Customers can change the password
Note: See TracChangeset for help on using the changeset viewer.