austins / Vanilla-App-Articles

Provides a way to publish articles with Vanilla Forums.
https://open.vanillaforums.com/addon/articles-application
GNU General Public License v2.0
11 stars 2 forks source link

Guest Commenting w/ ArticleCategory-Based Permissions #62

Open austins opened 8 years ago

austins commented 8 years ago

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:

  1. Keep the Articles.Comments.AllowGuests configuration option and modify the guest permission check code to retrieve the Member role's permissions and check if it has the Articles.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 the Articles.Comments.Add permission.
  2. Under the 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:

  1. Remove the guest commenting functionality (but keep old guest comments and view-ability of them). This may make it inconvenient for people who like to read blogs and comment without creating an account, but in nearly all cases, I believe that most people will want people to create an account to comment in order to build up their Vanilla forum community. I don't use guest commenting with the Articles app for my main website.
VrijVlinder commented 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.

austins commented 8 years ago

@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.