diff --git a/plone/app/discussion/browser/comments.pt b/plone/app/discussion/browser/comments.pt
index ceb50de..8e69b15 100644
--- a/plone/app/discussion/browser/comments.pt
+++ b/plone/app/discussion/browser/comments.pt
@@ -2,6 +2,7 @@
isDiscussionAllowed view/is_discussion_allowed;
isAnonymousDiscussionAllowed view/anonymous_discussion_allowed;
isEditCommentAllowed view/edit_comment_allowed;
+ isDeleteOwnCommentAllowed view/delete_own_comment_allowed;
isAnon view/is_anonymous;
canReview view/can_review;
replies python:view.get_replies(canReview);
@@ -90,7 +91,7 @@
action=""
method="post"
class="commentactionsform"
- tal:condition="python: not canDelete and view.could_delete_own(reply)"
+ tal:condition="python:not canDelete and isDeleteOwnCommentAllowed and view.could_delete_own(reply)"
tal:attributes="action string:${reply/absolute_url}/@@delete-own-comment;
style python:view.can_delete_own(reply) and 'display: inline' or 'display: none'">
False
+ False
diff --git a/plone/app/discussion/tests/test_controlpanel.py b/plone/app/discussion/tests/test_controlpanel.py
index 8a2ba47..d672167 100644
--- a/plone/app/discussion/tests/test_controlpanel.py
+++ b/plone/app/discussion/tests/test_controlpanel.py
@@ -89,12 +89,12 @@ class RegistryTest(unittest.TestCase):
'IDiscussionSettings.edit_comment_enabled'],
False)
- def test_edit_comment_enabled(self):
- # Check edit_comment_enabled record
- self.assertTrue('edit_comment_enabled' in IDiscussionSettings)
+ def test_delete_own_comment_enabled(self):
+ # Check delete_own_comment_enabled record
+ self.assertTrue('delete_own_comment_enabled' in IDiscussionSettings)
self.assertEqual(
self.registry['plone.app.discussion.interfaces.' +
- 'IDiscussionSettings.edit_comment_enabled'],
+ 'IDiscussionSettings.delete_own_comment_enabled'],
False)
def test_text_transform(self):