From 185341a6e83a9df485731656e0472ce4e3a924c1 Mon Sep 17 00:00:00 2001 From: Peter Dulacka Date: Fri, 21 Apr 2023 14:14:21 +0200 Subject: [PATCH] Fixed possibly incorrectly named ACL resource The bug kicked in if the name of the resource contained words "render", "action", or "signal". remp/crm#2841 --- src/Commands/GenerateAccessCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Commands/GenerateAccessCommand.php b/src/Commands/GenerateAccessCommand.php index 75bf287..fa7f60b 100644 --- a/src/Commands/GenerateAccessCommand.php +++ b/src/Commands/GenerateAccessCommand.php @@ -114,7 +114,7 @@ private function processPresenterClass($presenterClass, OutputInterface $output) } // parse resource & load access level from annotation - $action = str_replace($methodPrefix, '', $methodName); + $action = substr($methodName, strlen($methodPrefix)); $action = lcfirst($action); $reflectionClass = new ReflectionClass($presenterClass);