summaryrefslogtreecommitdiffstats
path: root/core/modules/comment/src/CommentForm.php
diff options
context:
space:
mode:
Diffstat (limited to 'core/modules/comment/src/CommentForm.php')
-rw-r--r--core/modules/comment/src/CommentForm.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/modules/comment/src/CommentForm.php b/core/modules/comment/src/CommentForm.php
index a9d742b..8766e27 100644
--- a/core/modules/comment/src/CommentForm.php
+++ b/core/modules/comment/src/CommentForm.php
@@ -169,7 +169,7 @@ class CommentForm extends ContentEntityForm {
'#maxlength' => 64,
'#size' => 30,
'#description' => $this->t('The content of this field is kept private and will not be shown publicly.'),
- '#access' => $is_admin || ($this->currentUser->isAnonymous() && $anonymous_contact != COMMENT_ANONYMOUS_MAYNOT_CONTACT),
+ '#access' => ($comment->getOwner()->isAnonymous() && $is_admin) || ($this->currentUser->isAnonymous() && $anonymous_contact != COMMENT_ANONYMOUS_MAYNOT_CONTACT),
);
$form['author']['homepage'] = array(