Commits

Stanislav Panasik committed f26db89

fixed several bugs

Comments (0)

Files changed (2)

 from django.db.models.signals import post_save
-from django.contrib.auth.models import User
+from django.contrib.auth.models import User,Group
 
 from pybb.subscription import notify_topic_subscribers
 from pybb.models import Post, Topic, Profile, ReadTracking
     if request_forum is None:
         request_forum = topic.forum
     
-    if have_permissions(request, request_forum, 'deny-view-forum'):
+    if (not request.user.is_superuser) and have_permissions(request, request_forum, 'deny-view-forum'):
         return HttpResponseRedirect('/')
     
     if forum:    
         if (not request.user.is_superuser) and (have_permissions(request, request_forum, 'deny-create-topic')):
             return HttpResponseRedirect('/')
     if topic:
-        if have_permissions(request, request_forum, 'deny-add-post'):
+        if (not request.user.is_superuser) and have_permissions(request, request_forum, 'deny-add-post'):
             return HttpResponseRedirect('/')