Protected logviews from exch-less users
This commit is contained in:
parent
8aa7910775
commit
b3ffd41973
|
@ -37,6 +37,9 @@ def contestIndex(request):
|
|||
|
||||
@login_required
|
||||
def log(request):
|
||||
if not request.user.ref:
|
||||
return HttpResponseRedirect(reverse("contest:index"))
|
||||
|
||||
form = None
|
||||
|
||||
qsos = QSO.objects.filter(owner=request.user).order_by("-ownNo")
|
||||
|
@ -74,6 +77,9 @@ def log(request):
|
|||
|
||||
@login_required
|
||||
def logEdit(request, qsoid):
|
||||
if not request.user.ref:
|
||||
return HttpResponseRedirect(reverse("contest:index"))
|
||||
|
||||
qso = QSO.objects.get(id=qsoid, owner=request.user)
|
||||
form = None
|
||||
|
||||
|
@ -90,6 +96,9 @@ def logEdit(request, qsoid):
|
|||
return render(request, 'contest/logEdit.html', {'form': form, "qso": qso})
|
||||
|
||||
def logDelete(request, qsoid):
|
||||
if not request.user.ref:
|
||||
return HttpResponseRedirect(reverse("contest:index"))
|
||||
|
||||
qso = QSO.objects.get(id=qsoid, owner=request.user)
|
||||
|
||||
if request.method == 'POST':
|
||||
|
|
Loading…
Reference in New Issue