From 11e7fabe77b2324c76400925c6cd435a7fd72f39 Mon Sep 17 00:00:00 2001 From: Akihito Koriyama Date: Tue, 17 Nov 2026 12:42:26 +0900 Subject: [PATCH 1/2] Point the attribute docblocks to the manual --- src/Annotation/RequiresRoles.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Annotation/RequiresRoles.php b/src/Annotation/RequiresRoles.php index afe65aa..ea51f2f 100644 --- a/src/Annotation/RequiresRoles.php +++ b/src/Annotation/RequiresRoles.php @@ -8,9 +8,15 @@ use Attribute; +/** + * Lets only the listed roles call the method, or every method of the class + * + * @see \Ray\RoleModule\RequiredRolesInterceptor + */ #[Attribute(Attribute::TARGET_METHOD | Attribute::TARGET_CLASS)] final class RequiresRoles { + /** @param list $value Roles allowed to call */ public function __construct(public array $value) { } From 6fca84fcc9191f8110d6e69c1eade7b56105bc4b Mon Sep 17 00:00:00 2001 From: Akihito Koriyama Date: Tue, 17 Nov 2026 16:08:10 +0900 Subject: [PATCH 2/2] State that RequiresRoles depends on the injected ACL --- src/Annotation/RequiresRoles.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Annotation/RequiresRoles.php b/src/Annotation/RequiresRoles.php index ea51f2f..a09969e 100644 --- a/src/Annotation/RequiresRoles.php +++ b/src/Annotation/RequiresRoles.php @@ -10,6 +10,7 @@ /** * Lets only the listed roles call the method, or every method of the class + * Other roles pass when the injected ACL already allows them on every resource or on the class * * @see \Ray\RoleModule\RequiredRolesInterceptor */