Giter VIP home page Giter VIP logo

acl_extras's People

Contributors

cameri avatar ceeram avatar lorenzo avatar markstory avatar mromagnoli avatar ozee31 avatar rchavik avatar wrdx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

acl_extras's Issues

Missing Plugin Persistent Issue

Hi Mark,

I know that there are lots of thread posts on this topic. I don't see any that seem to address the issue in a way that actually fixes my problem. Here's the setup:

acl_extras is listed as a submodule in the git repository
Of course, on clones of the repo the submodule init command is executed as is the submodule update command

The submodule correctly populates all of the contents of the acl_extras repo into /app/plugins/AclExtras

Finally, I have made sure to include the following in my bootstrap.php file:
CakePlugin::load('AclExtras');

The output is as follows when I try to run the following command:
Console/cake AclExtras.AclExtras aco_sync
or when I make webrequest to the project:

"Make sure your plugin AclExtras is in the app/Plugin directory and was loaded"

Seems like everything is correct to me. And thanks for the attention.

Best,
TMD

Cakephp doesn't load AclExtras

Hello !

Firstly, I precise i'm a french cooker, so i don't speak english very well.

In the second part of the cookbook 2.0, I have to download the AclExtras plugin. I extract it, I rename the folder name by 'AclExtras' and I put it in www/myProject/plugin.

Next, I add in the bootstrap 'CakePlugin::load('AclExtras')'.
Then, I open my console, and I go in www/myProjet/app and I execute this command : cake AclExtras.AclExtras aco_sync.

I receive an error :
C:\wamp\www\myProject\app> cake AclExtras.AclExtras aco_sync
Fatal error: Class 'Controller' not found in C:\www\wamp\myProject\app\Controller\AppController.php on line 2

Why? I don't understand.

Thank you for your help.

Shell class AclExtrasShell could not be found

Hi,
This could be like the other issues, but i checked the App::uses('Controller', 'Controller'); and it's not working.
I guess it's something different because it was working till 2 days ago and now I can't find where is the problem.

This is the output when i run the command Console/cake AclExtras aco_sync:

Error: Shell class AclExtrasShell could not be found.
#0 /opt/cakephp2.3.9/lib/Cake/Console/ShellDispatcher.php(192): ShellDispatcher->_getShell('AclExtras')
#1 /opt/cakephp2.3.9/lib/Cake/Console/ShellDispatcher.php(68): ShellDispatcher->dispatch()
#2 /home/user/proyect/myapp/Console/cake.php(38): ShellDispatcher::run(Array)
#3 {main}

Thank you in advance!

Error: Plugins AclExtras could not found

Hi, I'm using cakephp 2.2.3
AclExtras is in : /app/Plugin

My cake plugin path are:
array(
(int) 0 => '/Users/sdk/Sites/cakephp-2.2.3/app/Plugin/',
(int) 1 => '/Users/sdk/Sites/cakephp-2.2.3/plugins/'
)

and for AclExtras:
app/Plugin/AclExtras/'

I have CakePlugin::load('AclExtras'); in my bootstrap.php file.

What am I doing wrong ? because i still have "Error: Plugins AclExtras could not found" :/

Call to a member function node() on a non-object

I'm getting a fatal error when attempting to run any command. Not sure if it's something I'm doing wrong or a bug. Below is my terminal output......

[thril@Alice:/opt/www/interface/app (ISSUE13)]$ Console/cake AclExtras.AclExtras aco_sync

Welcome to CakePHP v2.4.2 Console

App : app

Path: /opt/www/interface/app/

PHP Fatal error: Call to a member function node() on a non-object in /opt/www/interface/app/Plugin/AclExtras/Lib/AclExtras.php on line 217
PHP Stack trace:
PHP 1. {main}() /opt/www/interface/app/Console/cake.php:0
PHP 2. ShellDispatcher::run() /opt/www/interface/app/Console/cake.php:33
PHP 3. ShellDispatcher->dispatch() /opt/www/interface/lib/Cake/Console/ShellDispatcher.php:68
PHP 4. Shell->runCommand() /opt/www/interface/lib/Cake/Console/ShellDispatcher.php:209
PHP 5. AclExtrasShell->aco_sync() /opt/www/interface/lib/Cake/Console/Shell.php:433
PHP 6. AclExtras->aco_sync() /opt/www/interface/app/Plugin/AclExtras/Console/Command/AclExtrasShell.php:64
PHP 7. AclExtras->aco_update() /opt/www/interface/app/Plugin/AclExtras/Lib/AclExtras.php:105
PHP 8. AclExtras->_checkNode() /opt/www/interface/app/Plugin/AclExtras/Lib/AclExtras.php:114

Method implementedEvents does not exist

Hi im trying to use the command : cake AclExtras.AclExtras aco_sync

But i have the following error , Can you help me ?

Error: Method implementedEvents does not exist
#0 /Users/Ricardo/Sites/online/2013/acl/app/Plugin/AclExtras/Lib/AclExtras.php(240): ReflectionClass->getMethod('implementedEven...')
#1 /Users/Ricardo/Sites/online/2013/acl/app/Plugin/AclExtras/Lib/AclExtras.php(269): AclExtras->_getCallbacks('GroupsControlle...')
#2 /Users/Ricardo/Sites/online/2013/acl/app/Plugin/AclExtras/Lib/AclExtras.php(172): AclExtras->_checkMethods('GroupsControlle...', 'Groups'

Wrong methods found in checkMethods

I have a project which contains multiple plugins. In the main application (/app/Controller) there is a file called FooController.php and in a plugin called "Bar" (/Plugin/Bar/Controller) there is another controller called FooController.php.

When re syncing the ACL tree, both of the FooControllers are found, but when the checkMethods function is called, and specifically:

get_class_methods($className)

the values which are returned are the list of methods in the FooController within the main application, and not that in plugin Bar. This means that the database is incorrectly populated, and the list of ACLs which have been stored never resemble the FooController in the Bar plugin.

ACO creation fails when a plugin has a controller with same name as app itself

I have a UsersController in my application (which uses db1) and another UsersController in my plugin working on another db (say db2).
The app's UsersController has following actions:

  • view
  • delete
  • resetPassword
  • news

and the plugin's UsersController has following actions:

  • login
  • register
  • logout

the interesting part is that when I run ./Console/cake AclExtras.AclExtras aco_sync -p CakeUser (where CakeUser is the plugin) I get the following output:

Welcome to CakePHP v2.4.4 Console
---------------------------------------------------------------
App : app
Path: C:\Dropbox\Emporia\Code\asui\app\
---------------------------------------------------------------
Created Aco node: controllers/CakeUser/Users/login
Created Aco node: controllers/CakeUser/Users/register
Created Aco node: controllers/CakeUser/Users/logout
Deleted Aco node: controllers/Users/view
Deleted Aco node: controllers/Users/delete
Deleted Aco node: controllers/Users/resetPassword
Deleted Aco node: controllers/Users/news
Aco Update Complete

and when I run ./Console/cake AclExtras.AclExtras aco_sync I will get following:

Welcome to CakePHP v2.4.4 Console
---------------------------------------------------------------
App : app
Path: C:\Dropbox\Emporia\Code\asui\app\
---------------------------------------------------------------
Created Aco node: controllers/CakeUser/Users/view
Created Aco node: controllers/CakeUser/Users/delete
Created Aco node: controllers/CakeUser/Users/resetPassword
Created Aco node: controllers/CakeUser/Users/news
Deleted Aco node: controllers/Users/login
Deleted Aco node: controllers/Users/register
Deleted Aco node: controllers/Users/logout
Aco Update Complete

This seems to me as a broken functionality as in any way the generated ACOs are not valid and permissions are not applied properly. It can get even worse when both controllers have the same action, then basically granting one permission will give access to other one.

I tried to see the ACO that AclComponent generates when checking for permission and good news is that it generates the right ACO path (with plugin inside) but as long as this obj is not placed in DB correctly it will malfunction.

acl_sync delete all Plugins and add it back

I run command from shell: ./Console/cake AclExtras.AclExtras aco_sync -v
Output:
Deleted controllers/AclExtras and all children
Deleted controllers/AclManager and all children
Created Aco node: controllers/AclExtras
Created Aco node: controllers/AclManager
Created Aco node: controllers/AclManager/Acl
Created Aco node: controllers/AclManager/Acl/drop
Created Aco node: controllers/AclManager/Acl/drop_perms
Created Aco node: controllers/AclManager/Acl/index
Created Aco node: controllers/AclManager/Acl/permissions
Created Aco node: controllers/AclManager/Acl/sync_acos
Created Aco node: controllers/AclManager/Acl/update_acos
Created Aco node: controllers/AclManager/Acl/update_acos2
Created Aco node: controllers/AclManager/Acl/update_aros

I dont remove plugins above, acl_extras just delete them and after that add it back .. it makes no sense.
I fix it by editing function _updateControllers,
I edit only this part.

    if ($this->_clean) {
        if (!$plugin) {
            $plugins = App::objects('plugin', null, false);
            foreach($plugins as &$one) {
                $one = $one.'Plugin';               
            }
            $controllers = array_merge($controllers, $plugins);
        }

        $controllerFlip = array_flip($controllers);

        $this->Aco->id = $root['Aco']['id'];
        $controllerNodes = $this->Aco->children(null, true);

        foreach ($controllerNodes as $ctrlNode) {
            $name = $ctrlNode['Aco']['alias']. 'Controller';
            $plugin_name = $ctrlNode['Aco']['alias']. 'Plugin';

            if (!isset($controllerFlip[$name]) && !isset($controllerFlip[$plugin_name] )) {

                if ($this->Aco->delete($ctrlNode['Aco']['id'])) {
                    $this->out(__(
                        'Deleted %s and all children',
                        $this->rootNode . '/' . $ctrlNode['Aco']['alias']
                    ), 1, Shell::VERBOSE);
                }
            }
        }
    }

After that acl_extras remove plugin and controllers or actions only when they are really removed from Plugin folder.

CakeObject and Object

Good day to all. and happy working. I want to ask a few question.

I just install acl extras plugin to my folder project.

1st step i copy file from github and save to my project.
2nd step i put CakePlugin::load('AclExtras'); in my bootstrap.php.
3rd step i check cake AclExtras.AclExtras -h i got problem which is CakeObject class not found in AclExtras.php line 27.

1st question how can i resolve this problem?? change 'CakeObject' to 'object' should be ok or not??

2nd question is where should i put the sentences like this
$this->Auth->authorize = 'actions';
$this->Auth->actionPath = 'controllers/';

im use CakePHP v2.6.4 (Welcome to CakePHP v2.6.4 Console)

Order of plugin controllers matters and is broken

I'm upgrading my app from 1.2 to 1.3. I'm using your acl_extras and everything works great except one weird issue. I'm not sure if this is a bug in Cake or a bug with acl_extras (but I figure you'd be the guy to know).

I have plugin controllers named:

avorders_attributes_contoller.php
avorders_categories_controller.php
avorders_controller.php
avorders_vendors_controller.php

They get input into the DB in the same order as on the file system (which is the order above). The ACL check fails for the first two controllers, but works for the 3rd and 4th. I modifed your code to sort the plugin controller names alphabetically and now ACL works as expected.

On line 190 I added: sort($controllers);

Thanks for this great plugin.

-Kevin

AclExtras could not be found

Hello everyone!

When I execute "cake AclExtras.AclExtras aco_sync", I get this error.

C:\wamp\www\myProject\app>cake AclExtras.AclExtras aco_sync

Error: Plugin AclExtras could not be found.
#0 C:\wamp\www\CakePHPLib\Cake\Core\App.php(364): CakePlugin::path('AclExtras')
#1 C:\wamp\www\CakePHPLib\Cake\Core\App.php(225): App::pluginPath('AclExtras')
#2 C:\wamp\www\CakePHPLib\Cake\Core\App.php(542): App::path('Console/Command', 'AclExtras')
#3 [internal function]: App::load('AclExtrasShell')
#4 [internal function]: spl_autoload_call('AclExtrasShell')
#5 C:\wamp\www\CakePHPLib\Cake\Console\ShellDispatcher.php(240): class_exists('AclExtrasShell')
#6 C:\wamp\www\CakePHPLib\Cake\Console\ShellDispatcher.php(191): ShellDispatcher->_getShell('AclExtras.AclEx...')
#7 C:\wamp\www\CakePHPLib\Cake\Console\ShellDispatcher.php(69): ShellDispatcher->dispatch()
#8 C:\wamp\www\CakePHPLib\Cake\Console\cake.php(41): ShellDispatcher::run(Array)
#9 {main}

skeleton =
www/myProject
--app/
--vendors/
--plugins/
----AclExtras/
------Console/
------Test/

And in bootstrap, I have CakePlugin::load('AclExtras');

Can you help me?
Thank you for reading.

Unsupported Operand Types (Cake 2.0.5)

Just following the ACL tutorial in the cookbook and installed your plugin. Both the Console script and the browser return a Fatal Error when the AclExtras plugin is enabled:

Fatal error: Unsupported operand types in /Users/nate/Sites/cakephp.local/lib/Cake/Core/CakePlugin.php on line 77

how to use acl_extras in cakephp 2.0 app?

I got this when i was using cake 1.3 console

sim-kim-sias-MacBook-Air:app simkimsia$ cake13 acl_extras help

Warning: Cache not configured properly. Please check Cache::config(); in APP/config/core.php in /Users/simkimsia/Dropbox/cakephp/cake13/cake/libs/configure.php on line 401
Error: Class AclExtrasShell could not be loaded.

I got the following when I tried cake 2.0 console

sim-kim-sias-MacBook-Air:app simkimsia$ cake20 acl_extras help

Error: Shell file acl_extras could not be loaded.
#0 /Users/simkimsia/Dropbox/cakephp/cake20/lib/Cake/Console/ShellDispatcher.php(166): ShellDispatcher->_getShell('acl_extras')
#1 /Users/simkimsia/Dropbox/cakephp/cake20/lib/Cake/Console/ShellDispatcher.php(69): ShellDispatcher->dispatch()
#2 /Users/simkimsia/Dropbox/cakephp/cake20/lib/Cake/Console/cake.php(24): ShellDispatcher::run(Array)
#3 {main}

Please advise.

Thank you.

Error: Plugin AclExtras could not be found

HI,

I read issue #18 and #19 and still can't fix my problem.

Running in Centos 6:

# Console/cake AclExtras.AclExtras aco_sync
# Console/cake AclExtras.AclExtras -h

#0 /var/www/cake/lib/Cake/Core/App.php(364): CakePlugin::path('AclExtras')
#1 /var/www/cake/lib/Cake/Core/App.php(225): App::pluginPath('AclExtras')
#2 /var/www/cake/lib/Cake/Core/App.php(542): App::path('Console/Command', 'AclExtras')
#3 [internal function]: App::load('AclExtrasShell')
#4 [internal function]: spl_autoload_call('AclExtrasShell')
#5 /var/www/cake/lib/Cake/Console/ShellDispatcher.php(240): class_exists('AclExtrasShell')
#6 /var/www/cake/lib/Cake/Console/ShellDispatcher.php(191): ShellDispatcher->_getShell('AclExtras.AclEx...')
#7 /var/www/cake/lib/Cake/Console/ShellDispatcher.php(69): ShellDispatcher->dispatch()
#8 /var/www/cake/app/Console/cake.php(33): ShellDispatcher::run(Array)
#9 {main}

I'm using CakePHP v2.2.0

My folder structure:
/app/Plugin/AclExtras/Console/Command/AclExtrasShell.php
/app/Plugin/AclExtras/Test/...

I have this on bootstrap.php:
CakePlugin::load('AclExtras');

Is there anything that im missing?

Thanks.

Scaffolding Addition

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

Database connection is missing.

When I run the following within cmd:

C:\wamp\www\app> cake AclExtras.AclExtras -h

I get the help lines. But when I run:

C:\wamp\www\app>cake AclExtras.AclExtras aco_sync

I get Error: Database connection "Sqlserver" is missing, or could not be created.

I have re-named the class in the connection file and this changes the error, so I know it is looking at the right Datasource file. I have also set the debug level to 2 and checked the file "tmp/cache/logs/debug.log" and nothing appears in here.

Any suggestions??

AclExtrass Warning Error: array_diff(): Argument #1 is not an array and more

After I executed the following command to create my acos:
./Console/cake AclExtras.AclExtras aco_sync

I get the following errors:

Warning Error: array_diff(): Argument 1 is not an array in [app/Plugin/AclExtras/Console/Command/AclExtrasShell.php, line 215]

Warning Error: Invalid argument supplied for foreach() in [app/Plugin/AclExtras/Console/Command/AclExtrasShell.php, line 216]

Warning Error: array_flip() expects parameter 1 to be array, null given in [app/Plugin/AclExtras/Console/Command/AclExtrasShell.php 226]

The command completes with a success message and 981 acos are created. However due to these errors don't believe they were created correctly.

I thought these errors were a result of the issue explained here: a60fe18

... which I was also experiencing. However after I implemented the fix only the error that corresponds to the fix was corrected and the 3 above mentioned continue to apear.

My system is running on:
CakePHP v2.2.1
php 5.3.x
postgresql 9.1.x

Broken backwards compatibility

This commit b5ebffc is breaking compatibility with every old version of cakephp which did not implement CakeObject (e.g. cake 2.4)

I think it will be a good practice to create tags (github releases) with versions so people can know when braking changes are introduced.

For example if 4d90442 is 1.0.0 (https://github.com/markstory/acl_extras/releases/tag/1.0.0), 90bcfcf could be 1.1.0 and the last 8e4ad76 could be 2.1.0. Doing it in this way, will allow us to have a better track of the different versions and set automatic updates using composer for example.

CakePHP 2.1 Acl startup error

I am getting following error with CakePHP 2.1

Warning Error: Argument 1 passed to Component::startup() must be an instance of Controller, null given, called in /home/lubos/lubos/app/Plugin/AclExtras/Console/Command/AclExtrasShell.php on line 80 and defined in [/home/lubos/lubos/lib/Cake/Controller/Component.php, line 119]

Issue after install and trying to run it.

I installed the plugin by git clone in the app/plugins dir, so I now have app/plugins/acl_extras. However when I run "cake acl_extras help" in the acl_extras dir, I get

/app/plugins/acl_extras/config/database.php): failed to open stream: No such file or directory in /Users/MetadoX/Sites/ksc/merchtrak/cake/libs/model/connection_manager.php on line 23

Not sure if it's something with the plugin or the application. This application that I'm working on is fairly new, however I did not build it from scratch I'm the third person to be working on it. I see from the notes the second person upgrade the cake core from 1.2 to 1.3. I don't think this would cause any problems since I dont have any other problems with the application. But you never know.

If you could shed some light on this issue I would gratefully appreciate it. I have made a lot of changes to the controllers and have added prefixes to them and need to repair my acos tree. Any recommendations would be great! Thank you ahead of time.

Error: Class InspectionsController does not exist

Ahoy! Having a little trouble here getting the aco_sync to work. I extracted to /app/Plugin/AclExtras I then added to by bootstrap CakePlugin::load('AclExtras');. Finally I ran - $ Console/cake acl_extras.acl_extras and the following came up without issue:

Better manage, and easily synchronize you application's ACO tree

Usage:
cake acl_extras.acl_extras [subcommand] [-h] [-v] [-q]

Subcommands:

aco_update  Add new ACOs for new controllers and actions. Does not
            remove nodes from the ACO table.
aco_sync    Perform a full sync on the ACO table.Will create new ACOs or
            missing controllers and actions.Will also remove orphaned entries that
            no longer have a matching controller/action
verify      Verify the tree structure of either your Aco or Aro Trees
recover     Recover a corrupted Tree

To see help on a subcommand use `cake acl_extras.acl_extras [subcommand] --help`

Options:

--help, -h     Display this help.
--verbose, -v  Enable verbose output.
--quiet, -q    Enable quiet output.

However, when I run $ Console/cake acl_extras.acl_extras aco_sync I get the following error:

Welcome to CakePHP v2.4.2 Console
---------------------------------------------------------------
App : app
Path: /var/www/vhosts/owenschimney.com/portal/app/
---------------------------------------------------------------
Error: Class InspectionsController does not exist
#0 /var/www/vhosts/owenschimney.com/portal/app/Plugin/AclExtras/Lib/AclExtras.php(234): ReflectionClass->__construct('InspectionsCont...')
#1 /var/www/vhosts/owenschimney.com/portal/app/Plugin/AclExtras/Lib/AclExtras.php(271): AclExtras->_getCallbacks('InspectionsCont...')
#2 /var/www/vhosts/owenschimney.com/portal/app/Plugin/AclExtras/Lib/AclExtras.php(166): AclExtras->_checkMethods('InspectionsCont...', 'Inspections', Array, NULL)
#3 /var/www/vhosts/owenschimney.com/portal/app/Plugin/AclExtras/Lib/AclExtras.php(118): AclExtras->_updateControllers(Array, Array)
#4 /var/www/vhosts/owenschimney.com/portal/app/Plugin/AclExtras/Lib/AclExtras.php(105): AclExtras->aco_update(Array)
#5 /var/www/vhosts/owenschimney.com/portal/app/Plugin/AclExtras/Console/Command/AclExtrasShell.php(64): AclExtras->aco_sync(Array)
#6 /var/www/vhosts/owenschimney.com/portal/lib/Cake/Console/Shell.php(433): AclExtrasShell->aco_sync()
#7 /var/www/vhosts/owenschimney.com/portal/lib/Cake/Console/ShellDispatcher.php(209): Shell->runCommand('aco_sync', Array)
#8 /var/www/vhosts/owenschimney.com/portal/lib/Cake/Console/ShellDispatcher.php(68): ShellDispatcher->dispatch()
#9 /var/www/vhosts/owenschimney.com/portal/app/Console/cake.php(37): ShellDispatcher::run(Array)

ACL not syncing

Hi,
I've succesfully setup my ACLs using Cake 2.3, now I just upgraded to Cake 2.5.4 and aco_update / aco_sync stop execution after the first controller with this error:

Error: Class GroupsController does not exist
#0 /var/www/www.site.org/net/Plugin/AclExtras/Lib/AclExtras.php(234): ReflectionClass->__construct('GroupsControlle...')
#1 /var/www/www.site.org/net/Plugin/AclExtras/Lib/AclExtras.php(271): AclExtras->_getCallbacks('GroupsControlle...')
#2 /var/www/www.site.org/net/Plugin/AclExtras/Lib/AclExtras.php(166): AclExtras->_checkMethods('GroupsControlle...', 'Groups', Array, NULL)
#3 /var/www/www.site.org/net/Plugin/AclExtras/Lib/AclExtras.php(118): AclExtras->_updateControllers(Array, Array)
#4 /var/www/www.site.org/net/Plugin/AclExtras/Lib/AclExtras.php(105): AclExtras->aco_update(Array)
#5 /var/www/www.site.org/net/Plugin/AclExtras/Console/Command/AclExtrasShell.php(64): AclExtras->aco_sync(Array)
#6 /var/www/www.site.org/lib/Cake/Console/Shell.php(437): AclExtrasShell->aco_sync()
#7 /var/www/www.site.org/lib/Cake/Console/ShellDispatcher.php(209): Shell->runCommand('aco_sync', Array)
#8 /var/www/www.site.org/lib/Cake/Console/ShellDispatcher.php(66): ShellDispatcher->dispatch()
#9 /var/www/www.site.org/net/Console/cake.php(47): ShellDispatcher::run(Array)
#10 {main}

This happens also with Cake 2.4.10

Error: Plugin AclExtras could not be found

hi,
I am using cake 2.3.5 and getting errors when I am going to build ACOs

Error Detail:

Error: Plugin AclExtras could not be found.
#0 C:\xampp\htdocs\cake_portal\lib\Cake\Core\App.php(366): CakePlugin::path('Acl

Extras')
#1 C:\xampp\htdocs\cake_portal\lib\Cake\Core\App.php(227): App::pluginPath('AclE

xtras')
#2 C:\xampp\htdocs\cake_portal\lib\Cake\Core\App.php(544): App::path('Console/Co

mmand', 'AclExtras')
#3 [internal function]: App::load('AclExtrasShell')
#4 [internal function]: spl_autoload_call('AclExtrasShell')
#5 C:\xampp\htdocs\cake_portal\lib\Cake\Console\ShellDispatcher.php(240): class_

exists('AclExtrasShell')
#6 C:\xampp\htdocs\cake_portal\lib\Cake\Console\ShellDispatcher.php(190): ShellD

ispatcher->_getShell('AclExtras.AclEx...')
#7 C:\xampp\htdocs\cake_portal\lib\Cake\Console\ShellDispatcher.php(68): ShellDi

spatcher->dispatch()
#8 C:\xampp\htdocs\cake_portal\lib\Cake\Console\cake.php(50): ShellDispatcher::r

un(Array)
#9 {main}

All paths looks good,
I followed already posted issue but no luck.
Please can you help me?

Problems loading in Plugin folder

I had problems with 2.0 version loading it as plugin.

To make it work I had to copy AclExtrasShell.php to Console/Command.

I'm not sure but I think this is a CakePHP 2.0 specific issue.

Error: Shell file AclExtras could not be loaded.

cakephp 2.0 ACL => Aco: controllers/Pages/display

When I use AclExtras It did not add to Aco tree Pages controller ..

Warning (512): DbAcl::check() - Failed ARO/ACO node lookup in permissions check. Node references:
Aro: Array
(
[User] => Array
(
[id] => 1
[username] => admin
[group_id] => 1
[created] => 2011-11-02 12:30:53
[modified] => 2011-11-02 12:30:53
)

)

Aco: controllers/Pages/display [CORE/Cake/Controller/Component/AclComponent.php, line 303]

I need to manually add it to fix this problem, but when I call AclExtras again. It remove Pages/display from Aco.

bootstrap controllers config

Hi Mark,
First of all thanks for your effort in creating this plugin.
I wanted to ask if there's going to be support for different than default folders for controllers etc.
Right now when the new controller is beeing created outside app/controllers it's actions wan't be read thus it wan't get acos entries created. The same situation, when you sync acos, actions from moved controllers will be deleted.
Thanks,
Tomasz.

One thing to add to the documentation

Hello Mark,

Thanks for the plugin. To a beginner to CakePHP such as myself, you've been a godsend.

I struggled for a while with this, because when I would run aco_sync, my site wouldn't seem to reflect controllers and views as having been registered as an ACO (I was getting Warning 512, and no page loads). Reading through a tutorial about ACL and Auth on your website (the one with two parts), I found that you need to add this to your AppController:

$this->AuthExt->actionPath = 'controllers/';

Perhaps this is obvious to everyone but me, or perhaps it's not and you might want to consider adding it as an instructing in your ReadMe. It's up to you.

At any rate, thanks a lot! Lookin forward to being able to contribute to this community eventually.

Best,
Jonathan

What about 3.0 ?

Hello Mark,

Did you have the project to make the 3.0 version of your plugin ? It would be awesome ! Because actually, there is no plugin/script to extract all controllers/actions for the CakePHP3/ACL plugin.

I have started to convert it, but to be honest, it's a little hard, because somes fonctions has been removed from 2.x and there is no fonctions in Cake3 who can do the sames things. Exemple :
App::uses
App::objects

Regards.

Lib update to 2.9.0 breaks acl_extras

Running cake AclExtras.AclExtras aco_sync results in an error:

PHP Fatal error: Class 'Object' not found in <path>Plugin/AclExtras/Lib/AclExtras.php on line 26

Editing AclExtras.php line 26 from:

class AclExtras extends Object {

to:

class AclExtras extends CakeObject {

fixes the issue.

CakeObject

Fatal error: Class 'CakeObject' not found in C:\wamp64\www\fatec_sys\app\Plugin\AclExtras\Lib\AclExtras.php on line 27

It is solved removing extends CakeObject, is this right?

aco_sync bug when plugin contains controller with same name

If you have a plugin named 'Users' and a plugin controller named 'Users', and you do an acl_extras aco_sync, first all the Users.Users methods will be added to the acos table but will be removed again right after.

Created Aco node: controllers/Users/Users/admin_index
Created Aco node: controllers/Users/Users/admin_add
Created Aco node: controllers/Users/Users/admin_edit
Created Aco node: controllers/Users/Users/admin_login
Created Aco node: controllers/Users/Users/admin_logout
Created Aco node: controllers/Users/Users/admin_delete
Deleted controllers/Users/admin_index and all children
Deleted controllers/admin_add and all children
Deleted controllers/admin_edit and all children
Deleted controllers/admin_login and all children
Deleted controllers/admin_logout and all children
Deleted controllers/admin_delete and all children

The printed "deleted path" also seems to be incorrect.

acl extras not found issue

i am using acl extras with cake2.3
I am unable to load aclextras
I have read your issues
aclextras shown in cakeplugin path but not loading on command line
help asap

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.