def get_all(self): """Return all members with whom the resource has been shared.""" acl.enforce('members:list', context.ctx()) LOG.info("Fetch resource members [resource_id=%s, resource_type=%s].", self.resource_id, self.type) db_members = db_api.get_resource_members(self.resource_id, self.type) members = [Member.from_dict(member.to_dict()) for member in db_members] return Members(members=members)
def get_all(self): """Return all members with whom the resource has been shared.""" LOG.info( "Fetch resource members [resource_id=%s, resource_type=%s].", self.resource_id, self.type ) db_members = db_api.get_resource_members( self.resource_id, self.type ) members = [Member.from_dict(member.to_dict()) for member in db_members] return Members(members=members)
def get_all(self): """Return all members with whom the resource has been shared.""" acl.enforce('members:list', context.ctx()) LOG.info( "Fetch resource members [resource_id=%s, resource_type=%s].", self.resource_id, self.type ) db_members = db_api.get_resource_members( self.resource_id, self.type ) members = [ resources.Member.from_dict(member.to_dict()) for member in db_members ] return resources.Members(members=members)