Revision 76ef2478 snf-pithos-backend/pithos/backends/modular.py

b/snf-pithos-backend/pithos/backends/modular.py
1709 1709
            meta.update(user_defined)
1710 1710
        return meta
1711 1711

  
1712
    def _has_read_access(self, user, path):
1713
        try:
1714
            account, container, object = path.split('/', 2)
1715
        except ValueError:
1716
            raise ValueError('Invalid object path')
1717

  
1718
        assert isinstance(user, basestring), "Invalid user"
1719

  
1720
        try:
1721
            self._can_read(user, account, container, object)
1722
        except NotAllowedError:
1723
            return False
1724
        else:
1725
            return True
1726

  
1727 1712
    def _exists(self, node):
1728 1713
        try:
1729 1714
            self._get_version(node)

Also available in: Unified diff