def checkACL_AJAX(request, query=None): if request.is_ajax(): acl = ACLHelper(None, query) acl.check() return HttpResponse(acl.traceback) return HttpResponse('')
def clean_condition(self): acl = ACLHelper(None, self.cleaned_data["condition"]) if acl.check() == -1: raise forms.ValidationError(acl.traceback) return self.cleaned_data['condition']