-
Notifications
You must be signed in to change notification settings - Fork 49
Open
Labels
Description
Hello,
I was following the CakePHP Simple ACL tutorial and noticed a small problem. If you actually bake all the methods like to tutorial says, you will find after using your plugin that the ACL check fails for the functions you are scaffolding.
So, I added a little bit to your script to support scaffolding:
public function _checkMethods(..)
{
...
$vars = get_class_vars($className);
if( array_key_exists('scaffold', $vars) )
{
$this->out(__('Scaffolding Detected: Adding Scaffolding Actions for class '.$className));
$array = array('add', 'edit', 'view', 'index', 'delete');
$actions = array_merge($actions, $array);
}
unset($array, $vars);
Reactions are currently unavailable