July 30, 2012 08:41:42
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?
July 30, 2012 09:50:22
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?
July 30, 2012 11:22:03
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.