--- a/src/pyams_security/interfaces/__init__.py Mon Feb 23 17:55:05 2015 +0100
+++ b/src/pyams_security/interfaces/__init__.py Sat Feb 28 15:22:21 2015 +0100
@@ -9,7 +9,6 @@
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
#
-from zope.interface.interfaces import IObjectEvent, ObjectEvent
__docformat__ = 'restructuredtext'
@@ -21,6 +20,7 @@
from pyams_skin.interfaces import IContentSearch
from zope.annotation.interfaces import IAttributeAnnotatable
from zope.container.interfaces import IContainer
+from zope.interface.interfaces import IObjectEvent, ObjectEvent
from zope.location.interfaces import IContained
# import packages
@@ -28,7 +28,7 @@
from pyams_utils.schema import EncodedPassword
from zope.container.constraints import contains, containers
from zope.interface import implementer, Interface, Attribute, invariant, Invalid
-from zope.schema import TextLine, Text, Int, Bool, List, Tuple, Set, Dict, Choice, Datetime, Object
+from zope.schema import TextLine, Text, Int, Bool, List, Tuple, Set, Dict, Choice, Datetime
from pyams_security import _
@@ -76,9 +76,9 @@
title = TextLine(title="Principal name",
required=True)
- groups = Set(title="Principal groups",
- description="IDs of principals to which this principal directly belongs",
- value_type=TextLine())
+ attributes = Dict(title="Principal groups",
+ description="IDs of principals to which this principal directly belongs",
+ value_type=TextLine())
class ICredentials(Interface):
@@ -207,6 +207,10 @@
"""
+class IGroupsAwareDirectoryPlugin(Interface):
+ """Marker interface for plug-ins handling groups"""
+
+
#
# Social users interfaces
#
@@ -459,7 +463,7 @@
# Principals groups
#
-class IGroupsFolderPlugin(IDirectorySearchPlugin):
+class IGroupsFolderPlugin(IDirectorySearchPlugin, IGroupsAwareDirectoryPlugin):
"""Principals groups folder plug-in"""
contains('pyams_security.interfaces.ILocalGroup')