DjangoBB

Django based forum engine

  • You are not logged in.

#1 July 30, 2012 08:41:42

Voltaire
Registered: 2012-07-30
Posts: 11
Reputation: +  0  -
Profile   Send e-mail  

Group based moderation

I was wondering if it was possible to have forum moderation based on groups in addition to moderators. Additionally, is it possible for forums to share a category, but have per forum view restrictions based on group?

Offline

#2 July 30, 2012 09:50:22

Voltaire
Registered: 2012-07-30
Posts: 11
Reputation: +  0  -
Profile   Send e-mail  

Group based moderation

I am new to django so this might all be wrong, but it turns out that at least getting forum access restricted to user group isnt too hard (or so it seems). I simply moved the groups model out of categories and into forums (and moved the has_access function as well), and then fixed up the views where they called that, and that seems to mostly work.

There is one segment in the view class that im not really sure how to fix up (again, pretty new to django):

line 169, view.py -
# add exlusions for categories user does not have access too
for category in Category.objects.all():
if not category.has_access(request.user):
query = query.exclude(category=category)

In my quick hack, I removed has_access from category and now its a function of the Forum model - and im not really familar with the queryset api to fix this up.

If I want really fine grain access control, is this an ok approach?

Finally, would doing something like changing the moderators model from User to Group (and fixing all the associated code) be an ok way to go about getting group-based moderation?

Offline

#3 July 30, 2012 11:22:03

jedie
From: germany
Registered: 2012-07-12
Posts: 160
Reputation: +  1  -
Profile   Send e-mail  

Group based moderation

It's easy to change the moderator user list to a list of user groups. But is this better?

IMHO is can be make sense to add a moderator group to Categories.

User which are in the “Categories moderator group” have permissions to moderate all forums from this category.

With this solution, you can setup moderators in two different ways.




Some of my Projects:
* Migrate phpBB to DjangoBB with django-phpBB3
* DjangoBB github repro and information about my changes
* PyLucid CMS written in Django: http://www.pylucid.org/

Offline

Board footer

Moderator control

Powered by DjangoBB

Lo-Fi Version