Changes proposed in this pull request:
This adds a new option in extension settings that allows admins to hide voting options when the post/tag/user does not have permissions to vote.
Reviewers should focus on:
This only adds a new configuration option. But perhaps the logic to hide should be reviewed:
if (setting('hideIfNoPermissions', true) && !post.canVote() && !post.canSeeVotes()) {
return;
}
This same logic was added to the alternate layout as well.
Screenshot
Confirmed
[X] Frontend changes: tested on a local Flarum installation.
[X] Backend changes: tests are green (run composer test).
Fixes #32 and somewhat related to v17development/flarum-support-feedback#14
Changes proposed in this pull request: This adds a new option in extension settings that allows admins to hide voting options when the post/tag/user does not have permissions to vote.
Reviewers should focus on: This only adds a new configuration option. But perhaps the logic to hide should be reviewed:
This same logic was added to the alternate layout as well.
Screenshot
Confirmed
composer test
).Required changes: N/A