From: jordan Date: Mon, 27 Dec 2010 18:14:22 +0000 (+0000) Subject: Adding method that checks if the user has the ability (permission) to convert commen... X-Git-Tag: live~502 X-Git-Url: https://git.openstreetmap.org./osqa.git/commitdiff_plain/34277501b49a285c3b797cf9a0135340531cdc7e?ds=sidebyside Adding method that checks if the user has the ability (permission) to convert comments to answers. git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@632 0cfe37f9-358a-4d5e-be75-b63607b5c754 --- diff --git a/forum/models/user.py b/forum/models/user.py index e3c97fa..e2f63c7 100644 --- a/forum/models/user.py +++ b/forum/models/user.py @@ -278,7 +278,7 @@ class User(BaseModel, DjangoUser): @true_if_is_super_or_staff def can_convert_comment_to_answer(self, comment): - return self == comment.author or self.reputation >= int(settings.REP_TO_COMMENTS_TO_ANSWERS) + return self == comment.author or self.reputation >= int(settings.REP_TO_CONVERT_COMMENTS_TO_ANSWERS) def can_convert_to_comment(self, answer): return (not answer.marked) and (self.is_superuser or self.is_staff or answer.author == self or self.reputation >= int