Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/Annotation/RequiresRoles.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,16 @@

use Attribute;

/**
* Lets only the listed roles call the method, or every method of the class
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
* Other roles pass when the injected ACL already allows them on every resource or on the class
*
* @see \Ray\RoleModule\RequiredRolesInterceptor
*/
#[Attribute(Attribute::TARGET_METHOD | Attribute::TARGET_CLASS)]
final class RequiresRoles
{
/** @param list<string> $value Roles allowed to call */
public function __construct(public array $value)
{
}
Expand Down
Loading