Hi Anja, sorry, I can't help you with your specific problem.
But maybe you want to take a look at this: http://www.cakephpforum.net/index.php?showtopic=27&st=0 With that, I set up Auth and ACL and it works like a charm. (You should read the entire thread, though. There are some bugfixes.) Regards Guenther Liebermann, Anja Carolin schrieb: > Hi everybody, > > Today I am stuck with setting up the permissions for Auth / ACL and I > have the suspicion it might not only be my tired brain causing the > problems. I try to set up my permissions again today, because some > things didn't work out as desired yesterday. So I did drop table on acos > and aros_acos and started with them from the start. I left aros, because > they look fine. > > I created my Acos using the automated tool: > http://book.cakephp.org/view/647/An-Automated-tool-for-creating-ACOs > That filled my table nicely. > > Now I am setting up my permissions on group level ("group" in German: > "Gruppe") . I use the function initDB > http://book.cakephp.org/view/648/Setting-up-permissions > which I dapted for my needs. > > The first lines are processed without obvious problems: > > //Allow admins to everything > $gruppe->id = 2; > $this->Acl->allow($gruppe, 'controllers'); > //Guest are denied everything (I'm no good host) > $gruppe->id = 1; > $this->Acl->deny($gruppe, 'controllers'); > > > ///What all other groups can see/ do > $ids = array(3,4,5,6,7,8,9,14,10,11,12,13,14,15); > foreach($ids as $i){ > $gruppe->id = $i; > $this->Acl->deny($gruppe, 'controllers'); > $this->Acl->allow($gruppe, 'controllers','read'); > $this->Acl->allow($gruppe, 'controllers/Todos'); > $this->Acl->allow($gruppe, 'controllers/Users/edit'); > > } > > With the next lines my problem starts: > > //Groups, which can edit > $ids = array(10,11,12,13,15); > foreach($ids as $i){ > $gruppe->id = $i; > $this->Acl->allow($gruppe, > 'controllers/Bilds/','create'); //This is line 129 which throws the > error > $this->Acl->allow($gruppe, > 'controllers/Hotelinfomasters','create'); > .... > > With the first line ('controllers/Bilds/','create') I get an error on > execution: > Warning (512): DbAcl::allow() - Invalid node > [CORE\cake\libs\controller\components\acl.php, line 369] > > $aro = Gruppe > Gruppe::$name = "Gruppe" > Gruppe::$useTable = "gruppes" > Gruppe::$actsAs = array > Gruppe::$hasMany = array > Gruppe::$useDbConfig = "default" > Gruppe::$displayField = "name" > Gruppe::$id = 10 > Gruppe::$data = array > Gruppe::$table = "gruppes" > Gruppe::$primaryKey = "id" > Gruppe::$_schema = array > Gruppe::$validate = array > Gruppe::$validationErrors = array > Gruppe::$tablePrefix = "" > Gruppe::$alias = "Gruppe" > Gruppe::$tableToModel = array > Gruppe::$logTransactions = false > Gruppe::$transactional = false > Gruppe::$cacheQueries = false > Gruppe::$belongsTo = array > Gruppe::$hasOne = array > Gruppe::$hasAndBelongsToMany = array > Gruppe::$Behaviors = BehaviorCollection object > Gruppe::$whitelist = array > Gruppe::$cacheSources = true > Gruppe::$findQueryType = NULL > Gruppe::$recursive = 1 > Gruppe::$order = NULL > Gruppe::$__exists = NULL > Gruppe::$__associationKeys = array > Gruppe::$__associations = array > Gruppe::$__backAssociation = array > Gruppe::$__insertID = NULL > Gruppe::$__numRows = NULL > Gruppe::$__affectedRows = NULL > Gruppe::$_findMethods = array > Gruppe::$_log = NULL > Gruppe::$User = User object > Gruppe::$Aro = Aro object > $aco = "controllers/Bilds/" > $actions = "create" > $value = 1 > $perms = false > $permKeys = array( > "_create", > "_read", > "_update", > "_delete" > ) > $save = array() > > > if ($perms == false) { > trigger_error(__('DbAcl::allow() - Invalid node', true), > E_USER_WARNING); > > DbAcl::allow() - CORE\cake\libs\controller\components\acl.php, line 369 > AclComponent::allow() - CORE\cake\libs\controller\components\acl.php, > line 103 > UsersController::initDB() - APP\controllers\users_controller.php, line > 129 > Object::dispatchMethod() - CORE\cake\libs\object.php, line 114 > Dispatcher::_invoke() - CORE\cake\dispatcher.php, line 259 > Dispatcher::dispatch() - CORE\cake\dispatcher.php, line 213 > [main] - ROOT\htdocs\pim\index.php, line 82 > > Is there something obviously wrong which I am missing? Yesterday That > script seemed to work. > > Thanks for any hints. I will now get some more caffeine, maybe that > helps, too! ;-) > > Anja > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---
