(analyst, type_, id_, data=None)
return results
Return DiffieConfigForm for diffie service.

    Must make sure user has source access to requested type and id.

    :param analyst: The username.
    :type analyst: str
    :param type_: CRITs type.
    :type type_: str
    :param id_: CRITs ID.
    :type id_: str
    :param data: Dictionary with submitted data.
    :type data: dict
    :returns: DiffieConfigForm
Return DiffieConfigForm for diffie service.
Return DiffieConfigForm for diffie service .
def get_diffie_config(analyst, type_, id_, data=None):
    """
    Return DiffieConfigForm for diffie service.

    Must make sure user has source access to requested type and id.

    :param analyst: The username.
    :type analyst: str
    :param type_: CRITs type.
    :type type_: str
    :param id_: CRITs ID.
    :type id_: str
    :param data: Dictionary with submitted data.
    :type data: dict
    :returns: DiffieConfigForm
    """

    results = {'success': False}

    sources = user_sources(analyst)
    klass = class_from_type(type_)
    obj = klass.objects(source__name__in=sources, id=id_).first()
    if not obj:
        results['message'] = "Either no data exists for this object or you do not have permission to view it."
        return results
    results['success'] = True
    results['form'] = forms.DiffieConfigForm(type_=type_, id_=id_, data=data)
    return results
def get_diffie_config ( analyst , type_ , id_ , data = None ) : results = { 'success' : False } sources = user_sources ( analyst ) klass = class_from_type ( type_ ) obj = klass . objects ( source__name__in = sources , id = id_ ) . first ( ) if not obj : results [ 'message' ] = "Either no data exists for this object or you do not have permission to view it." return results results [ 'success' ] = True results [ 'form' ] = forms . DiffieConfigForm ( type_ = type_ , id_ = id_ , data = data ) return results