[Zope3-checkins] CVS: Zope3/src/zope/app/interfaces/services/pluggableauth - __init__.py:1.6

Stephan Richter srichter at cosmos.phy.tufts.edu
Fri Aug 8 20:21:17 EDT 2003


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

Modified Files:
	__init__.py 
Log Message:
Made the IUser interface/schema internationalized and made the fields real
fields, replacing their earlier sorry excuses.


=== Zope3/src/zope/app/interfaces/services/pluggableauth/__init__.py 1.5 => 1.6 ===
--- Zope3/src/zope/app/interfaces/services/pluggableauth/__init__.py:1.5	Thu Jul 10 05:37:59 2003
+++ Zope3/src/zope/app/interfaces/services/pluggableauth/__init__.py	Fri Aug  8 19:21:13 2003
@@ -15,22 +15,40 @@
 
 $Id$
 """
-from zope.interface import Interface
+from zope.app.i18n import ZopeMessageIDFactory as _
 from zope.app.interfaces.container import IContainer 
 from zope.app.interfaces.security import IAuthenticationService, IPrincipal
-from zope.schema import TextLine, Password
-from zope.i18n import MessageIDFactory
-
-_ = MessageIDFactory("zope.app.services.pluggableauth")
+from zope.interface import Interface
+from zope.schema import Text, TextLine, Password
 
 class IUserSchemafied(IPrincipal):
     """A User object with schema-defined attributes."""
 
-    id = TextLine(title=_(u"Id"))
-    title = TextLine(title=_(u"Title"))
-    description = TextLine(title=_(u"Description"))
-    login = TextLine(title=_(u"Login"))
-    password = Password(title=_(u"Password"))
+    id = TextLine(
+        title=_("Id"),
+        description=_("The unique identification of the user"),
+        required=True,
+        readonly=True)
+
+    title = TextLine(
+        title=_("Title"),
+        description=_("The title of the user. This is usually used in the UI."),
+        required=False)
+
+    description = Text(
+        title=_("Description"),
+        description=_("A detailed description of the user."),
+        required=False)
+
+    login = TextLine(
+        title=_("Login"),
+        description=_("The Login/Username of the user. This value can change."),
+        required=True)
+
+    password = Password(
+        title=_(u"Password"),
+        description=_("The password for the user."),
+        required=True)
 
     def validate(test_password):
         """Confirm whether 'password' is the password of the user."""




More information about the Zope3-Checkins mailing list