def get_queryset(self, user):
    AccessControlList = apps.get_model(app_label='acls', model_name='AccessControlList')
    queryset = self.model.objects.all()
    for kwargs in self.filter_kwargs:
        queryset = queryset.filter(**kwargs)
    queryset = queryset.distinct()
    if self.object_permission:
        return AccessControlList.objects.filter_by_access(self.object_permission, user, queryset=queryset)
    else:
        return queryset
def get_queryset(self, user):
    AccessControlList = apps.get_model(app_label='acls', model_name='AccessControlList')
    queryset = self.model.objects.all()
    for kwargs in self.filter_kwargs:
        queryset = queryset.filter(**kwargs)
    queryset = queryset.distinct()
    if self.object_permission:
        return AccessControlList.objects.filter_by_access(self.object_permission, user, queryset=queryset)
    else:
        return queryset