Beispiel #1
0
def checkACL_AJAX(request, query=None):
    if request.is_ajax():
        acl = ACLHelper(None, query)
        acl.check()
        return HttpResponse(acl.traceback)
    return HttpResponse('')
Beispiel #2
0
 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']
Beispiel #3
0
def checkACL_AJAX(request, query=None):
    if request.is_ajax():
        acl = ACLHelper(None, query)
        acl.check()
        return HttpResponse(acl.traceback)
    return HttpResponse('')