Example #1
0
 def __of__(self, parent):
     m = getattr(self, methodattr)
     m = self.__dict__[methodattr]
     wrapper = getattr(m, '_permissionMapper', None)
     if wrapper is None: wrapper = PermissionMapper()
     if hasattr(m, '__of__'): return aqwrap(m, wrapper, parent)
     return m
Example #2
0
 def __of__(self, parent):
     m=getattr(self, methodattr)
     m=self.__dict__[methodattr]
     wrapper=getattr(m, '_permissionMapper', None)
     if wrapper is None: wrapper=PermissionMapper()
     if hasattr(m,'__of__'): return aqwrap(m, wrapper, parent)
     return m
    def __getattr__(self, name):
        p = self.__dict__['_product']
        d = p.__dict__
        if hasattr(p, name) and d.has_key(name):
            m = d[name]
            w = getattr(m, '_permissionMapper', None)
            if w is not None:
                m = aqwrap(m, aq_base(w), self)

            return m

        # Waaa
        m = 'Products.%s' % p.id
        if sys.modules.has_key(m) and sys.modules[m]._m.has_key(name):
            return sys.modules[m]._m[name]

        raise AttributeError, name
    def __getattr__(self, name):
        p=self.__dict__['_product']
        d=p.__dict__
        if hasattr(p,name) and name in d:
            m=d[name]
            w=getattr(m, '_permissionMapper', None)
            if w is not None:
                m=aqwrap(m, aq_base(w), self)

            return m

        # Waaa
        m = 'Products.%s' % p.id
        if m in sys.modules and sys.modules[m]._m.has_key(name):
            return sys.modules[m]._m[name]

        raise AttributeError, name
Example #5
0
 def __of__(self, parent):
     m = getattr(self, methodattr)
     m = self.__dict__[methodattr]
     if hasattr(m, '__of__'): return aqwrap(m, self, parent)
     return m
Example #6
0
 def __of__(self, parent):
     m=getattr(self, methodattr)
     m=self.__dict__[methodattr]
     if hasattr(m,'__of__'): return aqwrap(m, self, parent)
     return m