示例#1
0
    def get(self, member_id):
        """Shows resource member details."""
        acl.enforce('members:get', context.ctx())
        LOG.info(
            "Fetch resource member [resource_id=%s, resource_type=%s, "
            "member_id=%s].", self.resource_id, self.type, member_id)

        member_dict = db_api.get_resource_member(self.resource_id, self.type,
                                                 member_id).to_dict()

        return Member.from_dict(member_dict)
示例#2
0
    def get(self, member_id):
        """Shows resource member details."""
        LOG.info(
            "Fetch resource member [resource_id=%s, resource_type=%s, "
            "member_id=%s].",
            self.resource_id,
            self.type,
            member_id
        )

        member_dict = db_api.get_resource_member(
            self.resource_id,
            self.type,
            member_id
        ).to_dict()

        return Member.from_dict(member_dict)
示例#3
0
    def get(self, member_id):
        """Shows resource member details."""
        acl.enforce('members:get', context.ctx())

        LOG.info(
            "Fetch resource member [resource_id=%s, resource_type=%s, "
            "member_id=%s].",
            self.resource_id,
            self.type,
            member_id
        )

        member_dict = db_api.get_resource_member(
            self.resource_id,
            self.type,
            member_id
        ).to_dict()

        return resources.Member.from_dict(member_dict)