Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fixed call to has_perm

  • Loading branch information...
commit ecfa0b2e4d22418da093c65eb7bf6a63b5c87e31 1 parent f78a1e9
@brosner brosner authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 agora/views.py
View
8 agora/views.py
@@ -65,7 +65,7 @@ def forum(request, forum_id):
forum = get_object_or_404(Forum, id=forum_id)
threads = forum.threads.order_by("-sticky", "-last_modified")
- can_create_thread = request.user.has_perms("agora.add_forumthread", obj=forum)
+ can_create_thread = request.user.has_perm("agora.add_forumthread", obj=forum)
return render_to_response("agora/forum.html", {
"forum": forum,
@@ -77,7 +77,7 @@ def forum(request, forum_id):
def forum_thread(request, thread_id):
thread = get_object_or_404(ForumThread, id=thread_id)
- can_create_reply = request.user.has_perms("agora.add_forumreply", obj=thread)
+ can_create_reply = request.user.has_perm("agora.add_forumreply", obj=thread)
if request.user.is_authenticated() and not thread.closed and can_create_reply:
if request.method == "POST":
@@ -125,7 +125,7 @@ def post_create(request, forum_id):
member = request.user.get_profile()
forum = get_object_or_404(Forum, id=forum_id)
- can_create_thread = request.user.has_perms("agora.add_forumthread", obj=forum)
+ can_create_thread = request.user.has_perm("agora.add_forumthread", obj=forum)
if not can_create_thread:
messages.error(request, "You do not have permission to create a thread.")
@@ -168,7 +168,7 @@ def reply_create(request, thread_id):
if thread.closed:
messages.error(request, "This thread is closed.")
- can_create_reply = request.user.has_perms("agora.add_forumreply", obj=thread)
+ can_create_reply = request.user.has_perm("agora.add_forumreply", obj=thread)
if not can_create_reply:
messages.error(request, "You do not have permission to reply to this thread.")
Please sign in to comment.
Something went wrong with that request. Please try again.