Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting AclManager to Work with a Users Plugin #11

Open
larry-tx opened this issue Feb 23, 2013 · 6 comments
Open

Getting AclManager to Work with a Users Plugin #11

larry-tx opened this issue Feb 23, 2013 · 6 comments

Comments

@larry-tx
Copy link

I'm trying to use AclManager with the CakeDC Users plugin. I've tried entering this in the plugin's bootstrap file:

Configure::write('AclManager.aros', array('Group', 'Users.User'));

That gives nothing but errors, most notably including:

Warning (2): Invalid argument supplied for foreach() [APP\Plugin\AclManager\Controller\AclController.php, line 31]

Warning (2): Invalid argument supplied for foreach() [APP\Plugin\AclManager\Controller\AclController.php, line 39]

I also tried it without referencing the plugin as in:

Configure::write('AclManager.aros', array('Group', 'Users.User'));

That gave the same errors.

@FMCorz
Copy link
Owner

FMCorz commented Feb 23, 2013

The error you're showing does not seem linked to using a plugin. Please ensure that your settings are fully loaded first.

@FMCorz
Copy link
Owner

FMCorz commented Feb 23, 2013

See step 5 of the installation instructions.

@larry-tx
Copy link
Author

Thanks so much for that bit of assistance. The entry in my app/config/bootstrap file looks like this:

CakePlugin::load(
        array(
            'Users.Users', array('routes' => TRUE),
            'Utils.Sluggable',
            'ClearCache',
            'AclExtras',
            'AclManager', array('bootstrap' => TRUE),
        )
    );

The entry in the plugin's bootstrap file looks like this:

Configure::write('AclManager.aros', array('Group', 'Users.User'));

Actually, it seems like that last entry is causing the problems. I've also tried it in the following ways:

Configure::write('AclManager.aros', array('Group', 'Users/User'));
Configure::write('AclManager.aros', array('Group', 'User'));

The first one produces the same type of error. The second one just can't find the model.

@FMCorz
Copy link
Owner

FMCorz commented Mar 4, 2013

Sorry for not getting back to you earlier. Have you found a solution to this?

@larry-tx
Copy link
Author

Sorry, I had to move on to some other things, and am only now getting back to this. I have not found any solution. For some reason, this plugin just won't work. I have followed every instruction in the installation directions down to the letter, and I still get this same set of errors relating to "foreach ($aros as $aro)"

@parthvi
Copy link

parthvi commented Oct 31, 2014

Hey!

I got Same error. Any solution please.

Warning (2): Invalid argument supplied for foreach() [APP/Plugin/AclManager/Controller/AclController.php, line 32]

Warning (2): Invalid argument supplied for foreach() [APP/Plugin/AclManager/Controller/AclController.php, line 40]

It is not able to read 'AclManager.models', do we manually set it to plugin's botstrap file?

My Settings:
Configure::write('AclManager.aros', array('Group', 'User'));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants