[Zope3-checkins] CVS: Zope3/src/zope/app/services - auth.py:1.28

Stephan Richter srichter at cosmos.phy.tufts.edu
Mon Mar 8 07:07:33 EST 2004


Update of /cvs-repository/Zope3/src/zope/app/services
In directory cvs.zope.org:/tmp/cvs-serv13930/src/zope/app/services

Modified Files:
	auth.py 
Log Message:


Fixed it up, so that the tests will pass. I will remove the module next.




=== Zope3/src/zope/app/services/auth.py 1.27 => 1.28 ===
--- Zope3/src/zope/app/services/auth.py:1.27	Sat Mar  6 12:48:53 2004
+++ Zope3/src/zope/app/services/auth.py	Mon Mar  8 07:07:02 2004
@@ -15,7 +15,6 @@
 
 $Id$
 """
-
 from persistent import Persistent
 from BTrees.OOBTree import OOBTree
 
@@ -24,8 +23,7 @@
 
 from zope.app.container.interfaces import IContainer
 
-from zope.app.interfaces.security import ILoginPassword
-from zope.app.interfaces.security import IAuthenticationService
+from zope.app.security.interfaces import ILoginPassword, IAuthenticationService
 
 from zope.app.interfaces.services.auth import IAnnotatableUser
 
@@ -104,7 +102,7 @@
         'See IAuthenticationService'
         name = name.lower()
         return [p for p in self._usersbylogin.values()
-                  if p.getTitle().lower().find(name) >= 0 or
+                  if p.title.lower().find(name) >= 0 or
                      p.getLogin().lower().find(name) >= 0 ]
 
     def __getitem__(self, id):
@@ -169,12 +167,22 @@
     implements(IAnnotatableUser)
 
     def __init__(self, id, title, description, login, pw):
-        self.__id = id
-        self.__title = title
-        self.__description = description
+        self.id = id
+        self.title = title
+        self.description = description
         self.__login = login
         self.__pw = pw
 
+    def getTitle(self):
+        warn("Use principal.title instead of principal.getTitle().",
+             DeprecationWarning, 2)
+        return self.title
+
+    def getDescription(self):
+        warn("Use principal.description instead of principal.getDescription().",
+             DeprecationWarning, 2)
+        return self.description
+
     def getLogin(self):
         'See IReadUser'
         return self.__login
@@ -189,26 +197,6 @@
     def validate(self, pw):
         'See IReadUser'
         return pw == self.__pw
-
-    def getId(self):
-        'See IPrincipal'
-        return self.__id
-
-    def getTitle(self):
-        'See IPrincipal'
-        return self.__title
-
-    def getDescription(self):
-        'See IPrincipal'
-        return self.__description
-
-    def setTitle(self, title):
-        'See IWriteUser'
-        self.__title = title
-
-    def setDescription(self, description):
-        'See IWriteUser'
-        self.__description = description
 
     def setLogin(self, login):
         'See IWriteUser'




More information about the Zope3-Checkins mailing list