Author: jmorliaguet
Date: Tue Jun  6 12:30:15 2006
New Revision: 3333

Modified:
   cpsskins/branches/paris-sprint-2006/relations/relations.py

Log:

- skip the removeSecurityProxy() call. It is up to the application to manage
  security.



Modified: cpsskins/branches/paris-sprint-2006/relations/relations.py
==============================================================================
--- cpsskins/branches/paris-sprint-2006/relations/relations.py  (original)
+++ cpsskins/branches/paris-sprint-2006/relations/relations.py  Tue Jun  6 
12:30:15 2006
@@ -19,10 +19,9 @@
 
 from persistent import Persistent
 
-from zope.component.factory import Factory
 from zope.app.container.interfaces import IContained
+from zope.component.factory import Factory
 from zope.interface import implements
-from zope.security.proxy import removeSecurityProxy as trusted
 
 from cpsskins.relations.predicates import Predicate
 from cpsskins.relations.interfaces import IRelation
@@ -64,7 +63,7 @@
             raise IOError("Cannot set the predicate of a stored relation.")
         if not isinstance(predicate, basestring):
             raise TypeError("The predicate must be a string.")
-        self._predicate = trusted(Predicate(unicode(predicate)))
+        self._predicate = Predicate(unicode(predicate))
 
     def getRelates(self):
         return self._tuple
@@ -76,7 +75,7 @@
             raise TypeError("Relates must be passed as a list or as a tuple.")
         if len(relates) != self.arity:
             raise ValueError("Incorrect number of relates (%s)" % len(relates))
-        self._tuple = tuple([trusted(r) for r in relates])
+        self._tuple = tuple(relates)
 
     predicate = property(getPredicate, setPredicate)
 
@@ -111,8 +110,8 @@
     arity = 1
 
     def __init__(self, predicate=None, first=None):
-        self._predicate = trusted(predicate)
-        self._tuple = trusted(first),
+        self._predicate = predicate
+        self._tuple = first,
 
     def __getattr__(self, name):
         if name == 'first':
@@ -159,8 +158,8 @@
     arity = 2
 
     def __init__(self, predicate=u'', first=None, second=None):
-        self._predicate = trusted(predicate)
-        self._tuple = trusted(first), trusted(second)
+        self._predicate = predicate
+        self._tuple = first, second
 
     def __getattr__(self, name):
         if name == 'first':
@@ -216,8 +215,8 @@
     arity = 3
 
     def __init__(self, predicate=None, first=None, second=None, third=None):
-        self._predicate = trusted(predicate)
-        self._tuple = trusted(first), trusted(second), trusted(third)
+        self._predicate = predicate
+        self._tuple = first, second, third
 
     def __getattr__(self, name):
         if name == 'first':
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to