Revision 16b0ed4a snf-pithos-backend/pithos/backends/modular.py

b/snf-pithos-backend/pithos/backends/modular.py
1685 1685
                formatted.append((prop[0], self.MATCH_EXACT))
1686 1686
        return formatted
1687 1687

  
1688
    def _get_permissions_path(self, account, container, name):
1689
        path = '/'.join((account, container, name))
1690
        permission_paths = self.permissions.access_inherit(path)
1691
        permission_paths.sort()
1692
        permission_paths.reverse()
1693
        for p in permission_paths:
1694
            if p == path:
1695
                return p
1696
            else:
1697
                if p.count('/') < 2:
1698
                    continue
1699
                node = self.node.node_lookup(p)
1700
                props = None
1701
                if node is not None:
1702
                    props = self.node.version_lookup(node, inf, CLUSTER_NORMAL)
1703
                if props is not None:
1704
                    if props[self.TYPE].split(';', 1)[0].strip() in ('application/directory', 'application/folder'):
1705
                        return p
1706
        return None
1707

  
1688 1708
    def _get_permissions_path_bulk(self, account, container, names):
1689 1709
        formatted_paths = []
1690 1710
        for name in names:

Also available in: Unified diff