Navigation Menu

Skip to content
This repository has been archived by the owner on Nov 2, 2019. It is now read-only.

Commit

Permalink
views: Require a logged in account to view error reports
Browse files Browse the repository at this point in the history
  • Loading branch information
magcius committed Jun 27, 2013
1 parent dc45635 commit b16db18
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sweettooth/errorreports/views.py
@@ -1,6 +1,7 @@

from django.conf import settings
from django.contrib import messages
from django.contrib.auth.decorators import login_required
from django.core.mail import send_mail
from django.core.urlresolvers import reverse
from django.http import HttpResponseForbidden
Expand Down Expand Up @@ -39,6 +40,7 @@ def report_error(request, extension):
form=form)
return render(request, 'errorreports/report.html', context)

@login_required
@model_view(ErrorReport)
def view_error_report(request, obj):
return render(request, 'errorreports/view.html', dict(report=obj))
Expand Down

0 comments on commit b16db18

Please sign in to comment.