|
@@ -8,7 +8,7 @@ from review.forms import ReplyForm
|
|
|
from gauth.models import Location
|
|
|
from review.review_utils import reply_review
|
|
|
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
|
|
|
-from django.contrib.auth.mixins import LoginRequiredMixin
|
|
|
+from django.contrib.auth.mixins import LoginRequiredMixin, PermissionRequiredMixin
|
|
|
|
|
|
|
|
|
class ReviewListByLocationView(LoginRequiredMixin, View):
|
|
@@ -47,7 +47,8 @@ class ReviewListView(LoginRequiredMixin, View):
|
|
|
return render(request, 'review_list.html', context)
|
|
|
|
|
|
|
|
|
-class UnRepliedReviewList(LoginRequiredMixin, View):
|
|
|
+class UnRepliedReviewList(LoginRequiredMixin, PermissionRequiredMixin, View):
|
|
|
+ permission_required = 'is_staff'
|
|
|
|
|
|
def post(self, request, *args, **kwargs):
|
|
|
form = ReplyForm(self.request.POST)
|