Revision 7736e11a snf-pithos-backend/pithos/backends/modular.py

b/snf-pithos-backend/pithos/backends/modular.py
1592 1592

  
1593 1593
    @backend_method
1594 1594
    def get_domain_objects(self, domain, user=None):
1595
        obj_list = self.node.domain_object_list(domain, CLUSTER_NORMAL)
1596
        if user != None:
1597
            obj_list = [t for t in obj_list \
1598
                if self._has_read_access(user, t[0])]
1595
        allowed_paths = self.permissions.access_list_paths(user)
1596
        if not allowed_paths:
1597
            return []
1598
        obj_list = self.node.domain_object_list(
1599
            domain, allowed_paths, CLUSTER_NORMAL)
1599 1600
        return [(path,
1600 1601
                 self._build_metadata(props, user_defined_meta),
1601
                 self.permissions.access_get(path)) \
1602
            for path, props, user_defined_meta in obj_list]
1602
                 self.permissions.access_get(path)) for
1603
                path, props, user_defined_meta in obj_list]
1603 1604

  
1604 1605
    # util functions
1605 1606

  

Also available in: Unified diff