I allowed anonymous to post comments, but he can't edit/delete or reply.
In that case \Drupal\comment\CommentLazyBuilders::buildLinks adds a forbidden message for anonymous users without checking post comment permission.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | drupal_comment-check_post_access_anonymous-3251544-2.patch | 800 bytes | kiseleva.t |
Comments
Comment #2
kiseleva.t commentedComment #3
larowlanCan you please provide steps to reproduce, starting from 'install druoal'. Thanks
Comment #6
tobiasb$entity->access('create')can be used.Comment #7
quietone commentedIt has been almost a year and steps to reproduce have not been supplied. I tried to reproduce the problem with Drupal 10.0, standard install.
I gave permission to anonymous to add comments. I then added comments as anon when approval was needed and when approval was not. In both cases the results were the same. Anonymous can 'reply' but not edit comments.
I brought this up in #bugsmash. tobiasb considered this an edge case bug. However, larowlan pointed out that anon can't edit comments because the 'own comment' means any comment with the same uid. And since anon is always uid 0 it would mean anon can edit all anon comments, which really doesn't make sense. The conclusion was that this is working as designed.
Cheers.