def add_access_policy_filter(request, query, column_name):
    """Filter records that do not have ``read`` or better access for one or more of the
    active subjects.

    Since ``read`` is the lowest access level that a subject can have, this method only
    has to filter on the presence of the subject.

    """
    q = d1_gmn.app.models.Subject.objects.filter(
        subject__in=request.all_subjects_set
    ).values('permission__sciobj')
    filter_arg = '{}__in'.format(column_name)
    return query.filter(**{filter_arg: q})
def add_access_policy_filter ( request , query , column_name ) : q = d1_gmn . app . models . Subject . objects . filter ( subject__in = request . all_subjects_set ) . values ( 'permission__sciobj' ) filter_arg = '{}__in' . format ( column_name ) return query . filter ( ** { filter_arg : q } )
Filter records that do not have ``read`` or better access for one or more of the
    active subjects.

    Since ``read`` is the lowest access level that a subject can have, this method only
    has to filter on the presence of the subject.