Skip to content

Scaffolding Addition #14

@false-start

Description

@false-start

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);

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions