Changeset 7233 for main/waeup.sirp/trunk/src/waeup/sirp/students
- Timestamp:
- 28 Nov 2011, 21:04:57 (13 years ago)
- Location:
- main/waeup.sirp/trunk/src/waeup/sirp/students
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/students/authentication.py
r7221 r7233 28 28 from zope.publisher.interfaces.http import IHTTPRequest 29 29 from zope.session.interfaces import ISession 30 from waeup.sirp.authentication import PrincipalInfo, get_principal_role_manager30 from waeup.sirp.authentication import SIRPPrincipalInfo, get_principal_role_manager 31 31 from waeup.sirp.interfaces import ( 32 32 IAuthPluginUtility, IUserAccount, IPasswordValidator) … … 54 54 def email(self): 55 55 return self.context.email 56 57 @property 58 def phone(self): 59 return self.context.phone 56 60 57 61 @property … … 127 131 if not account.checkPassword(credentials['password']): 128 132 return None 129 return PrincipalInfo(id=account.name,133 return SIRPPrincipalInfo(id=account.name, 130 134 title=account.title, 131 description=account.description) 135 description=account.description, 136 email=account.email, 137 phone=account.phone) 132 138 133 139 def principalInfo(self, id): 134 140 """Get a principal identified by `id`. 135 141 136 This one is required by IAuthenticatorPlugin. 137 """ 138 account = self.getAccount(id) 139 if account is None: 140 return None 141 return PrincipalInfo(id=account.name, 142 title=account.title, 143 description=account.description) 142 This one is required by IAuthenticatorPlugin but not needed here 143 (see respective docstring in applicants package). 144 """ 145 return None 144 146 145 147 def getAccount(self, login): -
main/waeup.sirp/trunk/src/waeup/sirp/students/tests/test_authentication.py
r7221 r7233 64 64 password = None 65 65 email = None 66 phone = None 66 67 67 68
Note: See TracChangeset for help on using the changeset viewer.