Allow everyone to check domains via API

This commit is contained in:
Sebastian Lohff 2017-05-02 02:42:58 +02:00
parent 708d5e1a73
commit 9c564651a3
1 changed files with 4 additions and 4 deletions

View File

@ -183,8 +183,8 @@ def checkDomain(request):
try: try:
domainName = Domain.fixName(request.GET.get('domain', '')) domainName = Domain.fixName(request.GET.get('domain', ''))
domain = Domain.objects.get(name=domainName) domain = Domain.objects.get(name=domainName)
if not domain.canEdit(request.user): #if not domain.canEdit(request.user):
raise Domain.DoesNotExist() # raise Domain.DoesNotExist()
ret["success"] = True ret["success"] = True
ret["domain"] = domain.name ret["domain"] = domain.name
@ -208,8 +208,8 @@ def checkRzone(request):
try: try:
rzonePk = int(request.GET.get('domain', '')) rzonePk = int(request.GET.get('domain', ''))
rzone = ReverseZone.objects.get(pk=rzonePk) rzone = ReverseZone.objects.get(pk=rzonePk)
if not rzone.canEdit(request.user): #if not rzone.canEdit(request.user):
raise ReverseZone.DoesNotExist() # raise ReverseZone.DoesNotExist()
ret["success"] = True ret["success"] = True
# FIXME: change this if we ever have more than one... # FIXME: change this if we ever have more than one...