← Back to Awards Plugin

5.2.5 AwardPolicy Reference

Source: app/plugins/Awards/src/Policy/AwardPolicy.php

AwardPolicy is intentionally thin. It extends App\Policy\BasePolicy and inherits standard entity authorization such as add, view, edit, delete, and index delegation through the configured RBAC policy names.

There is no award-specific bypass in this class. Keep authorization calls in controllers and do not mistake an empty subclass for unrestricted access. Add a custom method here only when authorization depends on Award entity state; collection filtering belongs in AwardsTablePolicy.

Tests should cover configured permission allow/deny behavior and the table scope separately.