+# paths = self.permissions.access_list(path)
+# if paths:
+# ae = AttributeError()
+# ae.data = paths
+# raise ae
+
+ def _get_permissions_path(self, account, container, name):
+ path = '/'.join((account, container, name))
+ permission_paths = self.permissions.access_inherit(path)
+ permission_paths.sort()
+ permission_paths.reverse()
+ for p in permission_paths:
+ if p == path:
+ return p
+ else:
+ try:
+ parts = p.split('/', 2)
+ if len(parts) != 3:
+ return None
+ path, node = self._lookup_object(*p.split('/', 2))
+ props = self._get_version(node)
+ # XXX: Put type in properties...
+ meta = dict(self.node.attribute_get(props[self.SERIAL], 'pithos'))
+ if meta['Content-Type'] == 'application/directory':
+ return p
+ except NameError:
+ pass
+ return None