paula: removed old per-repo trunk subdirs
[paula.git] / paula.grouputil / src / paula / grouputil / interfaces.py
blob2503b019254c71241eadc8fe765e02ecb0ba69ab
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
24 from zope.schema import List
26 from paula.groups.interfaces import IMemberships
29 class IMembershipProvider(Interface):
30 """A membership provider associates 1..n principals with 1..m groups
32 In order to get all members of a group and all groups of a principal,
33 the information of several providers is combined.
35 The most common providers will associate one group with several members
36 (classic group) or one member with several groups (groups stored on the
37 prinicipal).
38 """
39 groups = List(
40 title=u"Groups",
41 description=u"The groups this provider defines members for",
44 members = List(
45 title=u"Members",
46 description=u"The members of the groups",
50 class IMembershipProviderAdaptable(Interface):
51 """Marker interface for objects that can be adapted to IMembershipProvider
52 """
55 class IRWMemberships(IMemberships):
56 """
57 """
59 def register(obj):
60 """Register an object
61 """
63 def unregister(obj):
64 """Unregister an object.
65 """