[Zope3-dev] Security proxied container id's
Dmitry Vasiliev
lists at hlabs.spb.ru
Thu May 26 07:30:24 EDT 2005
Now I'm trying to make a blog-like component. I've made a container and then I
want id's of the container items (actually just a ISO-formatted date strings)
will be sorted in reverse order. I guess the simplest solution is a unicode
subclass like this returned by the chooseName() method:
class ReverseOrderedName(unicode):
"""Reverse ordered name.
>>> m1 = ReverseOrderedName("A")
>>> m2 = ReverseOrderedName("B")
>>> m1 > m2
True
>>> m1 < m2
False
"""
def __cmp__(self, other):
return cmp(unicode(other), unicode(self))
Then I've made some security declarations and all working just fine but items
names displayed like '<security proxied ... instance at ...>'.
Is this reasonable/safe to apply attached patch or maybe I can reimplement my
container in some other way?
--
Dmitry Vasiliev (dima at hlabs.spb.ru)
http://hlabs.spb.ru
-------------- next part --------------
A non-text attachment was scrubbed...
Name: names.patch
Type: text/x-patch
Size: 3026 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope3-dev/attachments/20050526/d3c33576/names.bin
More information about the Zope3-dev
mailing list