From 8b883451cafb8423e84e75f5c51f6c17dc3725ad Mon Sep 17 00:00:00 2001 From: Gil Forcada Date: Sun, 3 May 2015 08:41:24 +0200 Subject: [PATCH] 80 chars --- plone/app/discussion/browser/moderation.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/plone/app/discussion/browser/moderation.py b/plone/app/discussion/browser/moderation.py index 6a3a9e9..3648924 100644 --- a/plone/app/discussion/browser/moderation.py +++ b/plone/app/discussion/browser/moderation.py @@ -118,15 +118,18 @@ class DeleteComment(BrowserView): class DeleteOwnComment(DeleteComment): - """Delete an own comment if it has no replies. Following conditions have to be true - for a user to be able to delete his comments: + """Delete an own comment if it has no replies. + + Following conditions have to be true for a user to be able to delete his + comments: * "Delete own comments" permission * no replies to the comment * Owner role directly assigned on the comment object """ def could_delete(self, comment=None): - """Returns true if the comment could be deleted if it had no replies.""" + """Returns true if the comment could be deleted if it had no replies. + """ sm = getSecurityManager() comment = comment or aq_inner(self.context) userid = sm.getUser().getId()