paula: removed old per-repo trunk subdirs
[paula.git] / paula.examples / src / paula / examples / interfaces.py
blob95069b197a7dbe2c4e33e48b110024c56a50e1ae
1 # Copyright (c) 2008 by Florian Friesdorf
3 # GNU Affero General Public License (AGPL)
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU Affero General Public License as
7 # published by the Free Software Foundation; either version 3 of the
8 # License, or (at your option) any later version.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU Affero General Public License for more details.
15 # You should have received a copy of the GNU Affero General Public
16 # License along with this program. If not, see
17 # <http://www.gnu.org/licenses/>.
18 """
19 """
20 __author__ = "Florian Friesdorf <flo@chaoflow.net>"
21 __docformat__ = "plaintext"
23 from zope.interface import Interface, alsoProvides
24 from zope.schema import List, Object, TextLine, Password
26 from paula.properties.interfaces import IPropertyInterface
29 class IBasicUser(Interface):
30 """Basic user
32 Everything needed to do authentication, nothing more or less.
33 """
34 title = TextLine(
35 title=u"Name",
36 description=u"The user's login name (unique within an"
37 "authentication realm).",
38 required=True,
41 password = Password(
42 title=u"Password",
43 description=u"The user password.",
44 required=True,
48 class IMinimalPloneProperties(Interface):
49 """Minimal properties for plone
50 """
51 realname = TextLine(
52 title=u"Realname",
53 description=u"The user's realname.",
54 required=True,
57 email = TextLine(
58 title=u"Email",
59 description=u"Email for user contact and password reset.",
60 required=True,
63 alsoProvides(IMinimalPloneProperties, IPropertyInterface)
66 class IMinimalPloneUser(IBasicUser,IMinimalPloneProperties):
67 """A user with minimal properties needed for plone
68 """
71 class IBasicGroup(Interface):
72 """Basic group content type
74 Everything needed to store information about group members in one place.
75 This is a good thing to inherit from, for more sophisticated content types.
76 """
78 title = TextLine(
79 title=u"Name",
80 description=u"The group name (unique within an authentication realm).",
81 required=True,
84 members = List(
85 title=u"Members",
86 description=u"List of member principal ids.",