Permissions
Stars registers granular Craft user permissions across three areas — reviews, comments, and the blocklist. Assign them per user group under Settings → Users. Admin users have all permissions by default.
Reviews
| Permission | Description |
|---|---|
stars:viewReviews | View the Reviews section in the CP |
stars:manageReviews | Create and edit reviews |
stars:moderateReviews | Approve, reject, and mark as spam |
stars:respondToReviews | Add admin responses |
stars:deleteReviews | Delete reviews |
Comments
| Permission | Description |
|---|---|
stars:viewComments | View the Comments section in the CP |
stars:manageComments | Create and edit comments |
stars:moderateComments | Approve, reject, and mark as spam |
stars:replyToComments | Reply to comments from the CP |
stars:deleteComments | Delete comments |
Blocklist
| Permission | Description |
|---|---|
stars:manageBlocklist | Manage blocked submitters (by email, IP, or user ID) |
The blocklist is enforced on both review and comment submission. Use the “Block Author” bulk action from any element index to quickly block a submitter.
Events
Reviews and comments are standard Craft elements, so you can hook into their lifecycle with the usual element events:
use craft\events\ModelEvent;
use justinholtweb\stars\elements\Review;
use yii\base\Event;
Event::on(Review::class, Review::EVENT_AFTER_SAVE, function(ModelEvent $event) {
/** @var Review $review */
$review = $event->sender;
// Your logic here
});