[Zope3-dev] IGroupFolder instead of isinstance?
Roger Ineichen
dev at projekt01.ch
Tue Feb 22 17:22:34 EST 2005
Is there a reason why we don't use a IGroupFolder interface?
I see some problems for future implementations like described
in the groupfolder.txt in zope.app.authentication.browser
----
[...] groups need to be defined in it's group folder.
Other groups folders or group-defining plugins could
define groups for a group.
----
because:
In the class zope.app.authentication.groupfolder.py
There is a check against a instance instead asking for
providing a interface?
for name, groupfolder in groupfolders:
# It's annoying that we have to filter here, but there isn't
# a good reason for people to register group folder utilities.
if not isinstance(groupfolder, GroupFolder):
^^^^^^^^^^
continue
principal.groups.extend(
groupfolder.getGroupsForPrincipal(principal.id),
)
or are events more private and we have to implement own
events for custom implementations? This looks like the event
was added specialy for one implementation.
Regards
Roger Ineichen
_____________________________
Projekt01 GmbH
www.projekt01.ch
Langackerstrasse 8
6330 Cham
phone +41 (0)41 781 01 78
mobile +41 (0)79 340 52 32
fax +41 (0)41 781 00 78
email r.ineichen at projekt01.ch
_____________________________
END OF MESSAGE
More information about the Zope3-dev
mailing list