]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/models/user.py
Added functionality to convert answers to comments as mentioned in Jira OSQA-462.
[osqa.git] / forum / models / user.py
index 124ea17ca3465d235a91d54a2050ac713a427950..e50c1f0843e8c50ddd2da692f49f9181e328740e 100644 (file)
@@ -279,6 +279,10 @@ class User(BaseModel, DjangoUser):
     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
                 (settings.REP_TO_CONVERT_TO_COMMENT))
+    
+    def can_convert_to_question(self, answer):
+        return (not answer.marked) and (self.is_superuser or self.is_staff or answer.author == self or self.reputation >= int
+                (settings.REP_TO_CONVERT_TO_QUESTION))
 
     @true_if_is_super_or_staff
     def can_accept_answer(self, answer):