From 65e45d5f69543e2957ce9a8ecb1dcbd5ff24cc6b Mon Sep 17 00:00:00 2001 From: Dusty Phillips Date: Wed, 30 Jul 2008 12:59:09 -0400 Subject: fix permission bug on news --- news/views.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'news') diff --git a/news/views.py b/news/views.py index 25f7735..05b5a38 100644 --- a/news/views.py +++ b/news/views.py @@ -15,7 +15,7 @@ def list(request): news = News.objects.order_by('-postdate', '-id') return render_response(request, 'news/list.html', {'news':news}) -@permission_required('news.add_news') +@permission_required('main.add_news') def add(request): try: m = User.objects.get(username=request.user.username) @@ -40,7 +40,7 @@ def add(request): form = forms.FormWrapper(manipulator, data, errors) return render_response(request, 'news/add.html', {'form': form}) -@permission_required('news.delete_news') +@permission_required('main.delete_news') def delete(request, newsid): news = get_object_or_404(News, id=newsid) #if news.author.id != request.user.id: @@ -50,7 +50,7 @@ def delete(request, newsid): return HttpResponseRedirect('/news/') return render_response(request, 'news/delete.html') -@permission_required('news.change_news') +@permission_required('main.change_news') def edit(request, newsid): try: m = User.objects.get(username=request.user.username) -- cgit v1.2.3-24-g4f1b