mirror of
https://github.com/django/django.git
synced 2025-01-28 19:19:20 +00:00
Fixed #1722 -- Fixed bug in CommentManager.user_is_moderator(). Thanks, Jure Cuhalev
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2848 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
4f15f10048
commit
a0872543a7
@ -56,7 +56,7 @@ class CommentManager(models.Manager):
|
||||
def user_is_moderator(self, user):
|
||||
if user.is_superuser:
|
||||
return True
|
||||
for g in user.group_set.all():
|
||||
for g in user.groups.all():
|
||||
if g.id == settings.COMMENTS_MODERATORS_GROUP:
|
||||
return True
|
||||
return False
|
||||
|
Loading…
x
Reference in New Issue
Block a user