diff options
author | Dusty Phillips <buchuki@gmail.com> | 2008-07-30 12:59:09 -0400 |
---|---|---|
committer | Dusty Phillips <buchuki@gmail.com> | 2008-07-30 12:59:09 -0400 |
commit | 65e45d5f69543e2957ce9a8ecb1dcbd5ff24cc6b (patch) | |
tree | 70de8bd19e6a05aba0bd9e79cbb45bec555ea6a4 | |
parent | 64c6711ff3c0ed5d5a96ca3ea8d5f494665afa01 (diff) |
fix permission bug on news
-rw-r--r-- | news/views.py | 6 | ||||
-rw-r--r-- | templates/news/list.html | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/news/views.py b/news/views.py index 25f77350..05b5a38e 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) diff --git a/templates/news/list.html b/templates/news/list.html index a6780f3f..86277666 100644 --- a/templates/news/list.html +++ b/templates/news/list.html @@ -2,7 +2,7 @@ {% block content %} <div class="greybox"> - {% if perms.news.add_news %} + {% if perms.main.add_news %} <div style="float:right"> <a href="/news/add/">Add News Item</a> </div> |