Extension Permission Issue... v 3.0.3.8
Posted: Sun Oct 09, 2022 12:34 pm
I am new to Opencart and PHP. So maybe my proposal is a little off...
I have just recently built my 1st extension. And upon inspection of the Core code. I found that it does not allow for extension subdirectories even though the
framework finds them and feeds them into the user group access form.
The AdminControllerStartupPermisssion Class breaks down the requested route into an array($part) and does some value checks. Then puts only part of the array back together as $route to send out to check for user access permission. This current design does not allow for extension subdirectories. I believe that whole class could be cleaned up and only check for the $ignore array and pass the incoming route directly to the user permission checker. I am still investigating if those extension array checks really need to be done at all. It seems as though the user permission checker controls the permissions.
But either way my proposal is to send the requested route straight to the user permission checker, and not the array of partially requested route..
I have just recently built my 1st extension. And upon inspection of the Core code. I found that it does not allow for extension subdirectories even though the
framework finds them and feeds them into the user group access form.
The AdminControllerStartupPermisssion Class breaks down the requested route into an array($part) and does some value checks. Then puts only part of the array back together as $route to send out to check for user access permission. This current design does not allow for extension subdirectories. I believe that whole class could be cleaned up and only check for the $ignore array and pass the incoming route directly to the user permission checker. I am still investigating if those extension array checks really need to be done at all. It seems as though the user permission checker controls the permissions.
But either way my proposal is to send the requested route straight to the user permission checker, and not the array of partially requested route..