Open austins opened 8 years ago
My opinion on guest commenting… If it can be moderated in real time. Otherwise spam a plenty. But some people want it so if you can give it to them as an option then it's all good.
@VrijVlinder, thanks for sharing your opinion. I'm leaning towards keeping the guest commenting feature and adding a check box list of categories to determine which categories guests can comment in.
Regarding moderation, perhaps the reCAPTCHA check could be added to stop spambots and have a comment be pending based on if the guest's email address has been approved previously like in WordPress.
ArticleCategory-based permissions have been implemented (see: issue #55), but guest commenting doesn't work with the changes since the Guest role is "a special role that does not allow active sessions. For this reason, the permission options [are] limited to 'view' permissions" (Edit Role page). As a result, there's no way to add the
Articles.Comments.Add
permission for the Guest role.Cases for solve this issue given these limitations:
Articles.Comments.AllowGuests
configuration option and modify the guest permission check code to retrieve the Member role's permissions and check if it has theArticles.Comments.Add
permission for the current article's category. Put simply, guests can comment if the configuration option to toggle guest commenting is enabled and the Member role has theArticles.Comments.Add
permission.Articles.Comments.AllowGuests
configuration option, add a check box list of categories the admin wants to allow guest commenting in, and save those to the config as a list of category IDs that are then used in the code. The guest has "permission" to post in categories selected by the admin, independent of other roles. Keep in mind that the upcoming Vanilla 2.3 disallows saving arrays into the config file.Case for removing guest commenting: