Re: Problems with ACL ARO ACO
If somebody is so kind to share some kind of tutorial that is known to work properly, I will be really happy ;) On Monday, 5 May 2014 13:07:27 UTC+1, Jumy Elerossë wrote: Hello everyone. I have been struggling with Cake PHP, specially with the part of the ACL, ARO and ACOS. I have been Googling and reading a lot, but the official example seems to be incomplete (looks like incomplete to me), and I can only find out of date examples. I'm using cakephp 2.4.7. This is my problem right now: I have a series of aros and acos created. What I can't do is to assign permissions to the aros in order to access to the acos, or in other words, that a aro from the model Group (I have User and Group) could access or not to controllers and actions of the controllers. I don't know what is the problem, and all the tutorials are out of date... -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/d/optout.
Re: Problems with ACL ARO ACO
I am wressling myself with Acl and I've found helpful to use the AclExtras plugin. There's a convenient (although slow) page that uses checkboxes to grant permissions. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/d/optout.
Re: Problems with ACL ARO ACO
Thank you very much, mate. I will give it a chance. On Tuesday, 6 May 2014 14:41:53 UTC+1, Dario Savella wrote: I am wressling myself with Acl and I've found helpful to use the AclExtras plugin. There's a convenient (although slow) page that uses checkboxes to grant permissions. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/d/optout.
Problems with ACL ARO ACO
Hello everyone. I have been struggling with Cake PHP, specially with the part of the ACL, ARO and ACOS. I have been Googling and reading a lot, but the official example seems to be incomplete (looks like incomplete to me), and I can only find out of date examples. I'm using cakephp 2.4.7. This is my problem right now: I have a series of aros and acos created. What I can't do is to assign permissions to the aros in order to access to the acos, or in other words, that a aro from the model Group (I have User and Group) could access or not to controllers and actions of the controllers. I don't know what is the problem, and all the tutorials are out of date... -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/d/optout.
Re: AclNode::node() - Couldn't find Aro node identified by Array ( [Aro0.model] = Group [Aro0.foreign_key] = 1 )
Feeling the dumbest guy in the world right now! Figured out I had the same problem after 1 hour going through every single line of the tutorial again... Thanks Rob! On Tuesday, April 2, 2013 3:31:41 PM UTC-3, Robert Denomme wrote: I had this same error message, what I had done was create a bunch of groups first, then deleted some. So there was no group with id=1. If you go to the db and check the group id's, those are the ones you should use to pupulate your ACL. -Rob On Thursday, October 29, 2009 2:08:22 AM UTC-7, Jeremy wrote: when I do Auth with cake , I happened a problem Warning (512): AclNode::node() - Couldn't find Aro node identified by Array ( [Aro0.model] = Group [Aro0.foreign_key] = 1 ) [CORE\cake\libs\model\db_acl.php, line 191] -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/groups/opt_out.
FullCalendar plugin: Failed ARO/ACO node lookup
Hey I'm want to use the FullCalendar plugin and my website is working with ACL. I'm have the aclPrep controller for creating the database structure of the aro's and aco's. But I have a problem with plugins, aro/aco lookup fails for everything I try. This is how my datastructures lookes like (automatically created by aclPrep): FullCalendar - empty -- add -- edit -- .. - empty --add .. So the structures, how is it supposed to look like? Thanx! Jeroen -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: FullCalendar plugin: Failed ARO/ACO node lookup
On Sunday, 2 June 2013 16:36:29 UTC+7, mebibyte wrote: Hey I'm want to use the FullCalendar plugin and my website is working with ACL. I'm have the aclPrep controller for creating the database structure of the aro's and aco's. But I have a problem with plugins, aro/aco lookup fails for everything I try. This is how my datastructures lookes like (automatically created by aclPrep): FullCalendar - empty -- add -- edit -- .. - empty --add .. So the structures, how is it supposed to look like? Typically, you will have Plugin/Controller/action (not just Controller/action). Checkout markstory's acl_extras plugin to scan your project. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
ERROR: AclNode::node() - Couldn't find Aro node identified by Array ( [Aro0.model] = User [Aro0.foreign_key] = )
Hello Fahad, how are you? well, im just gona hand it to you, im going suicidal at an issue that im having with my custom login. The thing is, I've integrated the Facebook plugin on croogo 1.4.4, from https://github.com/webtechnick/CakePHP-Facebook-Plugin. The only reason that im not using this plugin's register is because i want to manage the login myself. their code is quite buggy, im only using it for the API which offers for Facebook PHP api. Anyhoo, so i've created an action called *fblogin()* apart from the simple user login(). this is because i want my users to register manually in case they do not have facebook accounts; therefore, i would want to manage the Auth myself. So, below is my public function *fblogin() * *public function fblogin(){* *//actions to grab facebook response after fb.login() button is pressed* //first i create a new user $this-User-create(); $new_user = array(); $new_user['User']['username'] = test1; $new_user['User']['password'] = password123; //...*assign the rest of the necessary fields (email, phone, website, etc...) *if($this-User-save($new_user)){ $this-Session-setFlash(__('Your account was successfully created.'), 'default', array('class' = 'success')); $login_auth = array('username'=$new_user['User']['facebook_id'], 'password'=$new_user['User']['password']); $this-Auth-authenticate = array( 'Form' = array( 'fields' = array('username' = 'username', 'password' = $this-modelFields['password']) ) ); if ($this-Auth-login($login_auth)) { $this-Session-setFlash(__('You are now logged in as '.$full_name.' - '.$new_user['User']['password']), 'default', array('class' = 'success')); return $this-redirect('/'); } } *} * Below is the error that I receive: *Notice* (8): Undefined index: id [*CORE/Cake/Model/AclNode.php*, line *140*] AclNode::node() - Couldn't find Aro node identified by Array ( [Aro0.model] = User [Aro0.foreign_key] = ) *Error: * An Internal Error Has Occurred. I'm gona cry!... :'( - I might be standing in the wrong corner as I'm pretty sure that it's a CakePHP issue, and not a Croogo. is there something else that im missing? -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: AclNode::node() - Couldn't find Aro node identified by Array ( [Aro0.model] = Group [Aro0.foreign_key] = 1 )
I had this same error message, what I had done was create a bunch of groups first, then deleted some. So there was no group with id=1. If you go to the db and check the group id's, those are the ones you should use to pupulate your ACL. -Rob On Thursday, October 29, 2009 2:08:22 AM UTC-7, Jeremy wrote: when I do Auth with cake , I happened a problem Warning (512): AclNode::node() - Couldn't find Aro node identified by Array ( [Aro0.model] = Group [Aro0.foreign_key] = 1 ) [CORE\cake\libs\model\db_acl.php, line 191] -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Acl's Methods $aro param variations
Halo folks :) I Need to know variations of Acl's methods $aro param format. Hard to understand AclNode::node() method. I want to cache Acl's methods, but i don't know the variations of $aro param. Thank You :) -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en.
Re: Cake 2.1 Problem creating Aro records from existent users
Yes me too On Tuesday, April 3, 2012 8:44:46 AM UTC+8, Arnold wrote: Hi, I'm trying to implement ACL for my already created application and need to create the aro records for my current existent users. On IRC Ceeram said i just need to load AclBehaviour into my User's model, find all users and save it (update any field, i guess) and that will create the ARO row. I triedy but it doesn't works, it return me an error: AclNode::node() - Couldn#039;t find Aro node identified by quot;Array ( [Aro0.model] =gt; User [Aro0.foreign_key] =gt; 1 ) quot; this is my current code: / User actsAs... acl = requester //user model: // i don't want to have a groups table. i have rol field as ENUM in my user table for group public function parentNode() { if (!$this-id empty($this-data)) { return null; } if (isset($this-data['User']['rol'])) { $groupId = $this-data['User']['rol']; } else { $groupId = $this-field('rol'); } if (!$groupId) { return null; } else { return $groupId; } } //user controller function init_acl_db(){ $this-User-recursive = -1; $users = $this-User-find('all'); foreach ($users as $u) { $this-User-create(); $this-User-id = $u['User']['id']; $this-User-saveField('modified', date('Y-m-d h:i:s')); // this returns me this error: AclNode::node() - Couldn#039;t find Aro node identified by quot;Array ( [Aro0.model] =gt; User [Aro0.foreign_key] =gt; 1 ) quot; -- You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
Re: ACL: 3 levels ARO?
I don't see why this wouldn't work, since Aro's are a tree anyway. For one of my projects, I technically have a 10 level deep Aro setup, where each parent group inherits its children's permissions (that is, if you are of a higher group you can access everything lower groups can). The same applies here. On Monday, April 2, 2012 6:24:17 PM UTC-7, Arnold wrote: Hi, Im building an App for a school managament, we have schools, each school has many teachers and students. We need to allow each school to manage their permission for each teacher and students, both globally and user-specific. For this requirement i think I need an ACL solution with 3 levels: Student -- At this level we setup the global permission for all schools School-id - At this level schools can personalize their permission for their students student-id -- At this level schools can personalize they student-specific permissions School-id. student-id … Teacher School-id teacher-id This will work with cakephp ACL ? What do you suggest in order to implement this feature -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: ACL: 3 levels ARO?
So it will work! Great! Thank you. On Tue, Apr 3, 2012 at 8:57 AM, jeremyharris funeralm...@gmail.com wrote: I don't see why this wouldn't work, since Aro's are a tree anyway. For one of my projects, I technically have a 10 level deep Aro setup, where each parent group inherits its children's permissions (that is, if you are of a higher group you can access everything lower groups can). The same applies here. On Monday, April 2, 2012 6:24:17 PM UTC-7, Arnold wrote: Hi, Im building an App for a school managament, we have schools, each school has many teachers and students. We need to allow each school to manage their permission for each teacher and students, both globally and user-specific. For this requirement i think I need an ACL solution with 3 levels: Student -- At this level we setup the global permission for all schools School-id - At this level schools can personalize their permission for their students student-id -- At this level schools can personalize they student-specific permissions School-id. student-id … Teacher School-id teacher-id This will work with cakephp ACL ? What do you suggest in order to implement this feature -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Cake 2.1 Problem creating Aro records from existent users
Hi, I'm trying to implement ACL for my already created application and need to create the aro records for my current existent users. On IRC Ceeram said i just need to load AclBehaviour into my User's model, find all users and save it (update any field, i guess) and that will create the ARO row. I triedy but it doesn't works, it return me an error: AclNode::node() - Couldn#039;t find Aro node identified by quot;Array ( [Aro0.model] =gt; User [Aro0.foreign_key] =gt; 1 ) quot; this is my current code: / User actsAs... acl = requester //user model: // i don't want to have a groups table. i have rol field as ENUM in my user table for group public function parentNode() { if (!$this-id empty($this-data)) { return null; } if (isset($this-data['User']['rol'])) { $groupId = $this-data['User']['rol']; } else { $groupId = $this-field('rol'); } if (!$groupId) { return null; } else { return $groupId; } } //user controller function init_acl_db(){ $this-User-recursive = -1; $users = $this-User-find('all'); foreach ($users as $u) { $this-User-create(); $this-User-id = $u['User']['id']; $this-User-saveField('modified', date('Y-m-d h:i:s')); // this returns me this error: AclNode::node() - Couldn#039;t find Aro node identified by quot;Array ( [Aro0.model] =gt; User [Aro0.foreign_key] =gt; 1 ) quot; -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
ACL: 3 levels ARO?
Hi, Im building an App for a school managament, we have schools, each school has many teachers and students. We need to allow each school to manage their permission for each teacher and students, both globally and user-specific. For this requirement i think I need an ACL solution with 3 levels: Student -- At this level we setup the global permission for all schools School-id - At this level schools can personalize their permission for their students student-id -- At this level schools can personalize they student-specific permissions School-id. student-id … Teacher School-id teacher-id This will work with cakephp ACL ? What do you suggest in order to implement this feature -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Disable create new aro item for user while create new user (as requester)
Hi, sorry if I'm telling you something you are already aware of but the creation of AROs is done by the ACL behavior. Maybe if you want to disable this create temporarily you can do: $actsAs = $this-User-actsAs; $this-User-actsAs = null; $this-User-save(); $this-User-actsAs = $actsAs; from your controller if you want to disable the ARO creation selectively. If you want to disable it completely, simply don't add the ACL behavior to your user model. On Mar 24, 4:34 pm, baur79 bau...@gmail.com wrote: Hi, i have the working ACL cakephp app (group based ACL) i have users in group and make them ACL group-based every time a register new user it creates new ARO for user how can disable to creation in aro table, cause it make the trash rows (60 000 user = 60 rows) user model public $actsAs = array('Acl' = array('type' = 'requester')); group model public $actsAs = array('Acl' = array('type' = 'requester')); thanks in advance -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: [ACL] Disable create new aro item for user while create new user (as requester)
Use bindNode in the user model to return it's group, there is information about group only acl in the cake book. I use roles instead of groups, so in my case it looks like: function bindNode($user) { return array('model' = 'Role', 'foreign_key' = $user['User']['role_id']); } El sábado 24 de marzo de 2012 12:34:02 UTC+1, baur79 escribió: Hi, i have the working ACL cakephp app (group based ACL) i have users in group and make them ACL group-based every time a register new user it creates new ARO for user how can disable to creation in aro table, cause it make the trash rows (60 000 user = 60 rows) user model public $actsAs = array('Acl' = array('type' = 'requester')); group model public $actsAs = array('Acl' = array('type' = 'requester')); thanks in advance -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
[ACL] Disable create new aro item for user while create new user (as requester)
Hi, i have the working ACL cakephp app (group based ACL) i have users in group and make them ACL group-based every time a register new user it creates new ARO for user how can disable to creation in aro table, cause it make the trash rows (60 000 user = 60 rows) user model public $actsAs = array('Acl' = array('type' = 'requester')); group model public $actsAs = array('Acl' = array('type' = 'requester')); thanks in advance -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Failed ARO/ACO node lookup in permissions check
Hi I encountered a problem with acl, where a missing acl entry for a user is treated as an error. How could i interpret a missing acl entry as denial. So, if a user doesnt have an ACL entry with his name, then cakephp would assume that the user does not have the requested permission...because it cant have it without acl entry. thank you :) -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
cake 1.3 Aro parent_id disappears when user logs for the first time
Hi Could you please help me with the following question? I have installed Auth and Acl. I create a new user User1 who is in Group1 (who has aro id 10, for example). There is automatically an Aro created for this user with the Aros table with right is, parent_id, foreign_id, etc... Parent_id is rightfully set to 10. Then, when this user logs for the first time, the parent_id of the Aro of this user is deleted. So, not possible to log, as rights are inherited, and this creates a redirect loop... If after this first log, i change the parent_id in aro table for this User1, then the next time the User1 logs, the login works and the parent_id in Aros table is not deleted. I really can't find the reason. So far I have tried to trace and log, to find out where this query comes from. Here is the log of all the queries with trace(): 2011-10-07 11:16:37 Sql: SELECT `User`.`id`, `User`.`active`, `User`.`group_id`, `User`.`username`, `User`.`password`, `User`.`firstname`, `User`.`lastname`, `User`.`email`, `User`.`company`, `User`.`redirect`, `User`.`loggedin`, `User`.`last_login`, `User`.`last_logout`, `User`.`created`, `User`.`modified`, `Group`.`id`, `Group`.`parent_id`, `Group`.`name`, `Group`.`redirect`, `Group`.`user_count`, `Group`.`created`, `Group`.`modified` FROM `da_users` AS `User` LEFT JOIN `da_groups` AS `Group` ON (`User`.`group_id` = `Group`.`id`) WHERE `User`.`username` = 'test8' AND `User`.`password` = 'da9ea477e699c7d63be58504e6d6a99f32513a85'LIMIT 1 2011-10-07 11:16:37 Sql: SELECT COUNT(*) AS `count` FROM `da_users` AS `User` WHERE `User`.`id` = 31 2011-10-07 11:16:37 Sql: SELECT COUNT(*) AS `count` FROM `da_users` AS `User` WHERE `User`.`id` = 31 2011-10-07 11:16:37 Sql: TRACE : DboMysqlBase::update() - CORE\cake\libs\model\datasources\dbo\dbo_mysql.php, line 195 Model::save() - CORE\cake\libs\model\model.php, line 1327 AppController::beforeFilter() - APP\app_controller.php, line 22 UsersController::beforeFilter() - APP\controllers\users_controller.php, line 15 Controller::startupProcess() - CORE\cake\libs\controller\controller.php, line 522 Dispatcher::_invoke() - CORE\cake\dispatcher.php, line 187 Dispatcher::dispatch() - CORE\cake\dispatcher.php, line 171 [main] - APP\webroot\index.php, line 83 2011-10-07 11:16:37 Sql: update dbo_mysql : UPDATE `da_users` SET `id` = 31, `last_login` = '2011:10:07 11:16:37', `loggedin` = 1, `modified` = '2011-10-07 11:16:37' WHERE `da_users`.`id` = 31 2011-10-07 11:16:37 Sql: SELECT COUNT(*) AS `count` FROM `da_users` AS `User` WHERE `User`.`group_id` = 5 2011-10-07 11:16:37 Sql: TRACE : DboMysqlBase::update() - CORE\cake\libs\model\datasources\dbo\dbo_mysql.php, line 195 Model::updateAll() - CORE\cake\libs\model\model.php, line 1796 Model::updateCounterCache() - CORE\cake\libs\model\model.php, line 1519 Model::save() - CORE\cake\libs\model\model.php, line 1350 AppController::beforeFilter() - APP\app_controller.php, line 22 UsersController::beforeFilter() - APP\controllers\users_controller.php, line 15 Controller::startupProcess() - CORE\cake\libs\controller\controller.php, line 522 Dispatcher::_invoke() - CORE\cake\dispatcher.php, line 187 Dispatcher::dispatch() - CORE\cake\dispatcher.php, line 171 [main] - APP\webroot\index.php, line 83 2011-10-07 11:16:37 Sql: update dbo_mysql : UPDATE `da_groups` AS `Group` SET `Group`.`user_count` = 8 WHERE `Group`.`id` = 5 2011-10-07 11:16:37 Sql: aftersave in modl/behaviors/acl.php line 96 debug($parent) : 2011-10-07 11:16:37 Sql: SELECT `Aro`.`id`, `Aro`.`parent_id`, `Aro`.`model`, `Aro`.`foreign_key`, `Aro`.`alias` FROM `da_aros` AS `Aro` LEFT JOIN `da_aros` AS `Aro0` ON (`Aro`.`lft` = `Aro0`.`lft` AND `Aro`.`rght` = `Aro0`.`rght`) WHERE `Aro0`.`model` = 'User' AND `Aro0`.`foreign_key` = 31 ORDER BY `Aro`.`lft` DESC 2011-10-07 11:16:37 Sql: SELECT COUNT(*) AS `count` FROM `da_aros` AS `Aro` WHERE `Aro`.`id` = 39 2011-10-07 11:16:37 Sql: SELECT `Aro`.`parent_id` FROM `da_aros` AS `Aro` WHERE `Aro`.`id` = 39LIMIT 1 2011-10-07 11:16:37 Sql: SELECT COUNT(*) AS `count` FROM `da_aros` AS `Aro` WHERE `Aro`.`id` = 39 2011-10-07 11:16:37 Sql: TRACE: DboMysqlBase::update() - CORE\cake\libs\model\datasources\dbo\dbo_mysql.php, line 195 Model::save() - CORE\cake\libs\model\model.php, line 1327 AclBehavior::afterSave() - CORE\cake\libs\model\behaviors\acl.php, line 107 ModelBehavior::dispatchMethod() - CORE\cake\libs\model\model_behavior.php, line 171 BehaviorCollection::trigger() - CORE\cake\libs\model\model_behavior.php, line 494 Model::save() - CORE\cake\libs\model\model.php, line 1363 AppController::beforeFilter() - APP\app_controller.php, line 22 UsersController::beforeFilter() - APP\controllers\users_controller.php, line 15 Controller::startupProcess() - CORE\cake\libs\controller\controller.php, line 522 Dispatcher::_invoke() - CORE\cake\dispatcher.php, line 187 Dispatcher::dispatch() - CORE\cake\dispatcher.php, line 171 [main
Re: cake 1.3 Aro parent_id disappears when user logs for the first time
YES! Found it. Actually the problem was in the function parentNode() in User.php model: function parentNode(){ if(!$this-id empty($this-data)) return null; $data= empty($this-data) ? $this-read() : $this-data; if(empty($data['User']['group_id'])) return null; else return array('Group'=array('id'=$data['User']['group_id'])); } instead of this: $data= empty($this-data) ? $this-read() : $this-data; put this (actually $this-data didn't have group_id...): $data=$this-read(); and it works! : ) -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
2.0 AclNode not finding proper model for Aro
I installed a fresh copy of 2.0.0-RC2 and set up a simple UsersController and Model, and enabled Auth and Acl Components. I can log in, but when trying to access any page requiring an Acl-check() I get the following error. Warning (512): AclNode::node() - Couldn't find Aro node identified by Array ( [Aro0.model] = id [Aro0.foreign_key] = 1 ) [CORE/Cake/Model/AclNode.php, line 179] The Aro model should be User. A similar ticket was reported in Lighthouse back in May and supposedly fixed: http://cakephp.lighthouseapp.com/projects/42648/tickets/1749-cakephp-20-auth-user-breaks-acl-lookups-when-auth-authorize-is-set-to-actions I tried setting $this-Auth-authorize to crud and actions and got the same result. Any clue what I might be missing? -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Saving ARO taking around 10 seconds, processing tree behavior.
Thank you very much Shaz, that was precisely what I did,and as I said, the reading process is now faster, but the written continues being a pain. On May 30, 3:11 pm, Shaz shazam...@gmail.com wrote: Index it! http://www.mainelydesign.com/blog/view/speeding-up-cakephp-acl-component On May 30, 7:29 pm, Tufla hocanaste...@gmail.com wrote: After apply the change, the reading process has been improved a little, but the writing process continue taking a lot time :S BTW I checked and the AROS table is not fragmented. Any other idea ? Thank you. On May 27, 12:29 pm, Tufla hocanaste...@gmail.com wrote: Wow Jeremy, thank you very much...very good suggestion, I will do it, and I'll let you know how it works. On May 26, 11:54 pm, Jeremy Burns | Class Outfit jeremybu...@classoutfit.com wrote: The standard SQL that creates these tables uses MyIsam and therefore does not include referential integrity. Ideally, the tables should be InnoDb and have proper referential integrity. If you don't have that and can do it, I'd strongly recommend it. It will bring about dramatic speed improvements. Jeremy Burns Class Outfit jeremybu...@classoutfit.comhttp://www.classoutfit.com On 26 May 2011, at 19:07, Tufla wrote: I have an app working in CakePHP 1.2.1.8004 Currently my ARO's table has up to 43000 rows, and the ARO's save process, every time that a user creates an account, has became really slow. It is taking around 10 seconds exactly in the point where the save is made: $aro-save(array( 'model'=$model, 'foreign_key'=$id, 'parent_id'=$parent_id, 'alias'=$alias) ); More in deeply, the most time is spent processing the tree behavior in the _setParent(...) method. What can I do to improve the process performance ? Could it be an issue in the table ? Thank you in advanced for your help. -- Our newest site for the community: CakePHP Video Tutorialshttp://tv.cakephp.org Check out the new CakePHP Questions sitehttp://ask.cakephp.organdhelpotherswith their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/cake-php -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Saving ARO taking around 10 seconds, processing tree behavior.
After apply the change, the reading process has been improved a little, but the writing process continue taking a lot time :S BTW I checked and the AROS table is not fragmented. Any other idea ? Thank you. On May 27, 12:29 pm, Tufla hocanaste...@gmail.com wrote: Wow Jeremy, thank you very much...very good suggestion, I will do it, and I'll let you know how it works. On May 26, 11:54 pm, Jeremy Burns | Class Outfit jeremybu...@classoutfit.com wrote: The standard SQL that creates these tables uses MyIsam and therefore does not include referential integrity. Ideally, the tables should be InnoDb and have proper referential integrity. If you don't have that and can do it, I'd strongly recommend it. It will bring about dramatic speed improvements. Jeremy Burns Class Outfit jeremybu...@classoutfit.comhttp://www.classoutfit.com On 26 May 2011, at 19:07, Tufla wrote: I have an app working in CakePHP 1.2.1.8004 Currently my ARO's table has up to 43000 rows, and the ARO's save process, every time that a user creates an account, has became really slow. It is taking around 10 seconds exactly in the point where the save is made: $aro-save(array( 'model'=$model, 'foreign_key'=$id, 'parent_id'=$parent_id, 'alias'=$alias) ); More in deeply, the most time is spent processing the tree behavior in the _setParent(...) method. What can I do to improve the process performance ? Could it be an issue in the table ? Thank you in advanced for your help. -- Our newest site for the community: CakePHP Video Tutorialshttp://tv.cakephp.org Check out the new CakePHP Questions sitehttp://ask.cakephp.organdhelp others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/cake-php -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Saving ARO taking around 10 seconds, processing tree behavior.
Index it! http://www.mainelydesign.com/blog/view/speeding-up-cakephp-acl-component On May 30, 7:29 pm, Tufla hocanaste...@gmail.com wrote: After apply the change, the reading process has been improved a little, but the writing process continue taking a lot time :S BTW I checked and the AROS table is not fragmented. Any other idea ? Thank you. On May 27, 12:29 pm, Tufla hocanaste...@gmail.com wrote: Wow Jeremy, thank you very much...very good suggestion, I will do it, and I'll let you know how it works. On May 26, 11:54 pm, Jeremy Burns | Class Outfit jeremybu...@classoutfit.com wrote: The standard SQL that creates these tables uses MyIsam and therefore does not include referential integrity. Ideally, the tables should be InnoDb and have proper referential integrity. If you don't have that and can do it, I'd strongly recommend it. It will bring about dramatic speed improvements. Jeremy Burns Class Outfit jeremybu...@classoutfit.comhttp://www.classoutfit.com On 26 May 2011, at 19:07, Tufla wrote: I have an app working in CakePHP 1.2.1.8004 Currently my ARO's table has up to 43000 rows, and the ARO's save process, every time that a user creates an account, has became really slow. It is taking around 10 seconds exactly in the point where the save is made: $aro-save(array( 'model'=$model, 'foreign_key'=$id, 'parent_id'=$parent_id, 'alias'=$alias) ); More in deeply, the most time is spent processing the tree behavior in the _setParent(...) method. What can I do to improve the process performance ? Could it be an issue in the table ? Thank you in advanced for your help. -- Our newest site for the community: CakePHP Video Tutorialshttp://tv.cakephp.org Check out the new CakePHP Questions sitehttp://ask.cakephp.organdhelpothers with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/cake-php -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Saving ARO taking around 10 seconds, processing tree behavior.
Wow Jeremy, thank you very much...very good suggestion, I will do it, and I'll let you know how it works. On May 26, 11:54 pm, Jeremy Burns | Class Outfit jeremybu...@classoutfit.com wrote: The standard SQL that creates these tables uses MyIsam and therefore does not include referential integrity. Ideally, the tables should be InnoDb and have proper referential integrity. If you don't have that and can do it, I'd strongly recommend it. It will bring about dramatic speed improvements. Jeremy Burns Class Outfit jeremybu...@classoutfit.comhttp://www.classoutfit.com On 26 May 2011, at 19:07, Tufla wrote: I have an app working in CakePHP 1.2.1.8004 Currently my ARO's table has up to 43000 rows, and the ARO's save process, every time that a user creates an account, has became really slow. It is taking around 10 seconds exactly in the point where the save is made: $aro-save(array( 'model'=$model, 'foreign_key'=$id, 'parent_id'=$parent_id, 'alias'=$alias) ); More in deeply, the most time is spent processing the tree behavior in the _setParent(...) method. What can I do to improve the process performance ? Could it be an issue in the table ? Thank you in advanced for your help. -- Our newest site for the community: CakePHP Video Tutorialshttp://tv.cakephp.org Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/cake-php -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Saving ARO taking around 10 seconds, processing tree behavior.
I have an app working in CakePHP 1.2.1.8004 Currently my ARO's table has up to 43000 rows, and the ARO's save process, every time that a user creates an account, has became really slow. It is taking around 10 seconds exactly in the point where the save is made: $aro-save(array( 'model'=$model, 'foreign_key'=$id, 'parent_id'=$parent_id, 'alias'=$alias) ); More in deeply, the most time is spent processing the tree behavior in the _setParent(...) method. What can I do to improve the process performance ? Could it be an issue in the table ? Thank you in advanced for your help. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Saving ARO taking around 10 seconds, processing tree behavior.
The standard SQL that creates these tables uses MyIsam and therefore does not include referential integrity. Ideally, the tables should be InnoDb and have proper referential integrity. If you don't have that and can do it, I'd strongly recommend it. It will bring about dramatic speed improvements. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 26 May 2011, at 19:07, Tufla wrote: I have an app working in CakePHP 1.2.1.8004 Currently my ARO's table has up to 43000 rows, and the ARO's save process, every time that a user creates an account, has became really slow. It is taking around 10 seconds exactly in the point where the save is made: $aro-save(array( 'model'=$model, 'foreign_key'=$id, 'parent_id'=$parent_id, 'alias'=$alias) ); More in deeply, the most time is spent processing the tree behavior in the _setParent(...) method. What can I do to improve the process performance ? Could it be an issue in the table ? Thank you in advanced for your help. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Warning (512): DbAcl::check() - Failed ARO/ACO node lookup in permissions check.
I have ran cake acl create aco root controllers in the console, and ran the listed build_acl function in the second link. Both say they ran and don't report errors. The build_acl function lists a bunch of created acos. When I remove auth from users and groups, I am able to create a group at groups/add and create a user at users/add. Unfortunately when I visit a page that doesn't have auth turned off it comes up with a login prompt and doesn't let me authenticate with the user I just created. When I create a default user anonymous, I receive the 512 errors I posted in my first message. (I am assuming this is because anonymous doesn't require a login) On May 20, 3:04 am, ShadowCross adri...@jps.net wrote: Did you create your Access Control Objects? See:http://book.cakephp.org/view/1548/Creating-ACOs-Access-Control-Objects and the subsequent page:http://book.cakephp.org/view/1549/An-Automated-tool-for-creating-ACOs (andhttp://book.cakephp.org/view/1550/Setting-up-permissions) Basically, any action in your controller that is not included in the $this-Auth-allowedActions array (in the beforeFilter() method of that controller) needs to have an entry in the acos table, otherwise you get the warnings you indicated. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Warning (512): DbAcl::check() - Failed ARO/ACO node lookup in permissions check.
Did you create your Access Control Objects? See: http://book.cakephp.org/view/1548/Creating-ACOs-Access-Control-Objects and the subsequent page: http://book.cakephp.org/view/1549/An-Automated-tool-for-creating-ACOs (and http://book.cakephp.org/view/1550/Setting-up-permissions) Basically, any action in your controller that is not included in the $this-Auth-allowedActions array (in the beforeFilter() method of that controller) needs to have an entry in the acos table, otherwise you get the warnings you indicated. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Warning (512): DbAcl::check() - Failed ARO/ACO node lookup in permissions check.
Using Cake 1.3 I receive the following message after attempting to setup Auth/ACL. This happens on every page within the directory. Can anyone point me toward an area to troubleshoot? I am new to CakePHP Warning (512): DbAcl::check() - Failed ARO/ACO node lookup in permissions check. Node references: Aro: Array ( [User] = Array ( [id] = 2 [username] = anonymous [full_name] = visitor ) ) Aco: controllers/acos/index [CORE/cake/libs/controller/components/ acl.php, line 272] -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Warning (512): DbAcl::check() - Failed ARO/ACO node lookup in permissions check.
I have Cake Version 1.3 and I keep receiving this message. It doesn't matter which url I visit, any valid page throws these errors up. It was after Auth ACL and groups were setup. Does anyone know of maybe a quick fix that i am over looking? Warning (512): DbAcl::check() - Failed ARO/ACO node lookup in permissions check. Node references: Aro: Array ( [User] = Array ( [id] = 2 [username] = anonymous [full_name] = visitor ) ) Aco: controllers/groups/index [CORE/cake/libs/controller/components/ acl.php, line 272] -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
some error with ARO/ACO ACL
i use cakephp(v1.3.7) ACL i have this error: Warning (512): DbAcl::check() - Failed ARO/ACO node lookup in permissions check. Node references: Aro: Array ( [User] = Array ( [id] = 1 [username] = root [group_id] = 1 [created] = 2011-02-01 07:19:20 [modified] = 2011-02-01 07:50:36 ) ) Aco: Pages/display [CORE\cake\libs\controller\components\acl.php, line 273] Code | Context if (empty($aroPath) || empty($acoPath)) { trigger_error(__(DbAcl::check() - Failed ARO/ACO node lookup in permissions check. Node references:\nAro: , true) . print_r($aro, true) . \nAco: . print_r($aco, true), E_USER_WARNING); $aro = array( User = array( id = 1, username = root, group_id = 1, created = 2011-02-01 07:19:20, modified = 2011-02-01 07:50:36 ) ) $aco = Pages/display $action = * $permKeys = array( _create, _read, _update, _delete ) $aroPath = array( array( Aro = array() ), array( Aro = array() ) ) $acoPath = false DbAcl::check() - CORE\cake\libs\controller\components\acl.php, line 273 AclComponent::check() - CORE\cake\libs\controller\components\acl.php, line 92 AuthComponent::isAuthorized() - CORE\cake\libs\controller\components \auth.php, line 527 AuthComponent::startup() - CORE\cake\libs\controller\components \auth.php, line 445 Component::triggerCallback() - CORE\cake\libs\controller \component.php, line 186 Controller::startupProcess() - CORE\cake\libs\controller \controller.php, line 523 Dispatcher::_invoke() - CORE\cake\dispatcher.php, line 187 Dispatcher::dispatch() - CORE\cake\dispatcher.php, line 171 [main] - APP\webroot\index.php, line 83 Warning (2): Cannot modify header information - headers already sent by (output started at D:\xampp\htdocs\cakeacl\cake\libs\debugger.php: 673) [CORE\cake\libs\controller\controller.php, line 742] Code | Context $status = Location: http://localhost/cakeacl/users/login; header - [internal], line ?? Controller::header() - CORE\cake\libs\controller\controller.php, line 742 Controller::redirect() - CORE\cake\libs\controller\controller.php, line 721 AuthComponent::startup() - CORE\cake\libs\controller\components \auth.php, line 450 Component::triggerCallback() - CORE\cake\libs\controller \component.php, line 186 Controller::startupProcess() - CORE\cake\libs\controller \controller.php, line 523 Dispatcher::_invoke() - CORE\cake\dispatcher.php, line 187 Dispatcher::dispatch() - CORE\cake\dispatcher.php, line 171 [main] - APP\webroot\index.php, line 83 how can i fix it? -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Model as aro and aco
Is it possible to use a model as a request object and a controlled object at the same time? For example, if I have a table of users, can I use ACL so each user can only read and update their own user? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
CakePHP ACL [Failed ARO/ACO node lookup in permissions check]
Hello. I have create an application with CakePHP that uses the ACL. In my database I have this data: AROS: = |__ID__|__PARENT_ID__|__MODEL|__FOREIGN_KEY__| __ALIAS__|_lft__|_rght_| = |__1___|__null_|__Group__|__1__| __Administrators___|__1__|__4__| |__2___|__1___|__User___|__1__| __admin__|__2__|__3__| |__3___|__null_|__Group__|__2__| __Accountants |__5__|__6__| |__4___|__null_|__Group__|__3__|__Database Admins`|__7__|__8__| |__5___|__null_|__Group__|__4__| __Translators__|__9__|__14_| |__6___|__5___|__User___|__2__| __engtrans|__10_|__11_| |__7___|__5___|__User___|__3__| __esptrans|__12_|__13_| = ACOS = |__ID__|__PARENT_ID__|__MODEL|__FOREIGN_KEY__| __ALIAS__|_lft__|_rght_| = |__1___|__null_|__null|__null| __controllers__|__1__|__4__| |__2___|__1___|__null|__null| __Groups |__2__|__3__| |__3___|__null_|__null|__null| __Users__|__5__|__6__| = AROS_ACOS |__ID__|__ARO_ID__|__ACO_ID__|___CREATE__|___READ__|___UPDATE__| ___DELETE__| |__1__|__1|__1|__1_|__1___|__1_| __1__| and then in my Site I do that $aco = ''controllers; $aro = 1; $this-AccessControll-getPermission($aco, $aros); and I get this error : Warning (512): DbAcl::check() - Failed ARO/ACO node lookup in permissions check. Node references: Aro: 1 Aco: controllers [CORE\cake\libs\controller\components\acl.php, line 275] [Warning - code] if (empty($aroPath) || empty($acoPath)) { trigger_error(__(DbAcl::check() - Failed ARO/ACO node lookup in permissions check. Node references:\nAro: , true) . print_r($aro, true) . \nAco: . print_r($aco, true), E_USER_WARNING); [Warning - context] $aro= 1 $aco= controllers $action = create $permKeys = array( _create, _read, _update, _delete ) $aroPath= false $acoPath= array( array( Aco = array() ) ) Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: CakePHP ACL [Failed ARO/ACO node lookup in permissions check]
You actually want to reference the model then the aco in question. For example, if you have a Users model and you want to identify a user with an id of 1, you would actually write: User.1 Not simply 1. That's very confusing and ambiguous in the documentation. Took me a while to figure it out. Also a heads up: you almost certainly will want to use the Console to do a lot of the initial setup for your ACLs. But take a careful look at the code, because the --help menus don't explain what comes first, the ACO or the ARO in the function call. I put in to have the help menu updated - even gave them a patch over at Lighthouse - but I haven't seen it yet. I would love to take some time and rewrite parts of the ACL documentation in the book but oh, man, is that a tall order. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Urgent, help: Setting up permission to allow aro to access aco (problem)
SOLVED. Setting permission can be done using the function build_acl regards, Maxim On Dec 31 2010, 4:19 pm, John Maxim goog...@gmail.com wrote: Hi I don't understand this: cake acl grant john /controllers/posts/edit * Now I am giving John all permission for edit node ?? All permission for edit node ??? or just the right to edit ? Also, when I host my App later, how am I going to run a cake console ??? ??? Is it after changing the permission locally, using the console, it would be changed permanently in the associated files? so we don't need to run it unless we need to update permission ? regards, Maxim On Dec 31, 3:39 pm, John Maxim goog...@gmail.com wrote: Hi I'm stuck right here:http://book.cakephp.org/view/1550/Setting-up-permissions I don't know how to set the permission right, can anyone point this out? Is it either we can do one way or both ? (1) grant aronode aconode [aco_action] or all Use this command to grant ACL permissions. Once executed, the ARO specified (and its children, if any) will have ALLOW access to the specified ACO action (and the ACO's children, if any). For more detailed parameter usage info, see help for the 'create' command. (2) this line of code is it placed in app_controller.php ? $this-Acl-allow($aroAlias, $acoAlias); ~~ I don't know at all how to run permission with shell. It gave error like: c:\wamp\www\appcake acl grant $aroAlias $acoAlias all PHP Warning: DbAcl::allow() - Invalid node in C:\wamp\www\cake\libs \controller\components\acl.php on line 361 Warning: DbAcl::allow() - Invalid node in C:\wamp\www\cake\libs \controller\components\acl.php on line 361 Permission was not granted. Any help with this? ~ Regards, thanks. Maxim Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Urgent, help: Setting up permission to allow aro to access aco (problem)
Hi I don't understand this: cake acl grant john /controllers/posts/edit * Now I am giving John all permission for edit node ?? All permission for edit node ??? or just the right to edit ? Also, when I host my App later, how am I going to run a cake console ??? ??? Is it after changing the permission locally, using the console, it would be changed permanently in the associated files? so we don't need to run it unless we need to update permission ? regards, Maxim On Dec 31, 3:39 pm, John Maxim goog...@gmail.com wrote: Hi I'm stuck right here:http://book.cakephp.org/view/1550/Setting-up-permissions I don't know how to set the permission right, can anyone point this out? Is it either we can do one way or both ? (1) grant aronode aconode [aco_action] or all Use this command to grant ACL permissions. Once executed, the ARO specified (and its children, if any) will have ALLOW access to the specified ACO action (and the ACO's children, if any). For more detailed parameter usage info, see help for the 'create' command. (2) this line of code is it placed in app_controller.php ? $this-Acl-allow($aroAlias, $acoAlias); ~~ I don't know at all how to run permission with shell. It gave error like: c:\wamp\www\appcake acl grant $aroAlias $acoAlias all PHP Warning: DbAcl::allow() - Invalid node in C:\wamp\www\cake\libs \controller\components\acl.php on line 361 Warning: DbAcl::allow() - Invalid node in C:\wamp\www\cake\libs \controller\components\acl.php on line 361 Permission was not granted. Any help with this? ~ Regards, thanks. Maxim Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: (Acl) Error: aro not found No tree returned.
Hi thanks, Amit. It still can't be resolved I tried your suggestion. I'm starting installing acl from fresh. Based on what you said should work (executing in the webpage).. Rgds, Maxim On Dec 31, 2:42 pm, Amit Badkas amit.sanis...@gmail.com wrote: Hi, Add following code at the end of myAction() method, so that it won't try to render the view $this-render(false); Also look at the SQL queries if 'aros' table is populating correctly or not by setting debug level to 2. Hope this helps. Amit Badkas PHP Applications for E-Biz:http://www.sanisoft.com On Fri, Dec 31, 2010 at 11:52 AM, John Maxim goog...@gmail.com wrote: I tried executing by going to url: localhost/my_app_name/users/ anyAction can't load it asks me to check and make sure my file anyaction.ctp is created in views/users regards, maxim On Dec 31, 12:42 pm, Amit Badkas amit.sanis...@gmail.com wrote: Hi, I meant that you need to access the method myAction() from URL so that the code in that method will get executed and according to that code, the dummy records will get populated to 'aros' table. Amit Badkas PHP Applications for E-Biz:http://www.sanisoft.com On Fri, Dec 31, 2010 at 9:40 AM, John Maxim goog...@gmail.com wrote: Hi Amit...thanks for the reply but.. I don't understand. In my Users, there is no file named by anyAction.. anyAction function was saved in /controllers/users_controller.php What do you mean ?.. best regards, Maxim On Dec 31, 11:33 am, Amit Badkas amit.sanis...@gmail.com wrote: Hi, Have you executed the code in anyAction() to populate ACL tables with dummy data, something like http:// your-domain-here/your-app-name-here/users/anyAction? Amit Badkas PHP Applications for E-Biz:http://www.sanisoft.com On Thu, Dec 30, 2010 at 8:39 PM, John Maxim goog...@gmail.com wrote: Hi everyone, While working on the sample provided from cookbook (link below) I was going to create an aro where the codes are to be placed in a controller. I chose users_controller.php and I then verify by typing on my console: cake acl view aro It resulted in Error: aro not found No tree returned. What's wrong with it ? http://book.cakephp.org/view/1245/Defining-Permissions-Cake-s-Databas. .. Regards, Maxim Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.com cake-php%2bunsubscr...@googlegroups.comcake-php%252bunsubscr...@googlegroups.com cake-php%2bunsubscr...@googlegroups.comcake-php%252bunsubscr...@googlegroups.com cake-php%252bunsubscr...@googlegroups.comcake-php%25252bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.com cake-php%2bunsubscr...@googlegroups.comcake-php%252bunsubscr...@googlegroups.comFor more options, visit this group at http://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.comFor more options, visit this group at http://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: DbAcl Failed ARO/ACO node lookup (SOLVED accidentally)
hi John, ~~ERROR msg~~ Warning (512): DbAcl::check() - Failed ARO/ACO node lookup in permissions check. Node references: Aro: User::44 Aco: Post [CORE\cake\libs\controller\components\acl.php, line 273] ~~ The error is shown above. I solved this accidentally, maybe someone could rectify if my solution is correct? The full story how I ended up with this error can be read here: http://groups.google.com/group/cake-php/browse_thread/thread/478daa30a5c26e18 Suggestion to repopulate the Acl tables was not attempted before I could, I solved it when reading cookbook here: http://book.cakephp.org/view/1244/Defining-Permissions-Cake-s-INI-based-ACL Extracted from cookbook: ~~ //Change these lines: Configure::write('Acl.classname', 'DbAcl'); Configure::write('Acl.database', 'default'); //To look like this: Configure::write('Acl.classname', 'IniAcl'); //Configure::write('Acl.database', 'default'); ~~ Suggestion(s) ? The reason your fix works is because (I'm assuming anyway) you have some data in your acl.ini.php file. This was what people meant by 'populate' the acl tables, you have to have data for both the aco and aro tables: aco = controller/Method aro = user or group id (usually!) If you followed the instructions in http://book.cakephp.org/view/1549/An-Automated-tool-for-creating-ACOs and http://book.cakephp.org/view/1550/Setting-up-permissions you'd be in the same position with dbAcl as you are with iniAcl, however depending on your requirements iniAcl may be perfectly adequate. hth Jon -- jon bennett - www.jben.net - blog.jben.net Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: DbAcl Failed ARO/ACO node lookup (SOLVED accidentally)
Hi Jon, DbAcl and iniAcl Which one do we commonly use ? Regards, Maxim On Dec 30, 5:48 pm, Jon Bennett jmbenn...@gmail.com wrote: hi John, ~~ERROR msg~~ Warning (512): DbAcl::check() - Failed ARO/ACO node lookup in permissions check. Node references: Aro: User::44 Aco: Post [CORE\cake\libs\controller\components\acl.php, line 273] ~~ The error is shown above. I solved this accidentally, maybe someone could rectify if my solution is correct? The full story how I ended up with this error can be read here: http://groups.google.com/group/cake-php/browse_thread/thread/478daa30... Suggestion to repopulate the Acl tables was not attempted before I could, I solved it when reading cookbook here: http://book.cakephp.org/view/1244/Defining-Permissions-Cake-s-INI-bas... Extracted from cookbook: ~~ //Change these lines: Configure::write('Acl.classname', 'DbAcl'); Configure::write('Acl.database', 'default'); //To look like this: Configure::write('Acl.classname', 'IniAcl'); //Configure::write('Acl.database', 'default'); ~~ Suggestion(s) ? The reason your fix works is because (I'm assuming anyway) you have some data in your acl.ini.php file. This was what people meant by 'populate' the acl tables, you have to have data for both the aco and aro tables: aco = controller/Method aro = user or group id (usually!) If you followed the instructions inhttp://book.cakephp.org/view/1549/An-Automated-tool-for-creating-ACOs andhttp://book.cakephp.org/view/1550/Setting-up-permissionsyou'd be in the same position with dbAcl as you are with iniAcl, however depending on your requirements iniAcl may be perfectly adequate. hth Jon -- jon bennett -www.jben.net- blog.jben.net Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: DbAcl Failed ARO/ACO node lookup (SOLVED accidentally)
hi john, DbAcl and iniAcl Which one do we commonly use ? Depends on what you need. I go with DbAcl myself. -- jon bennett - www.jben.net - blog.jben.net Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: DbAcl Failed ARO/ACO node lookup (SOLVED accidentally)
Ok Jon thanks for the explanation. Regards, Maxim On Dec 30, 6:03 pm, Jon Bennett jmbenn...@gmail.com wrote: hi john, DbAcl and iniAcl Which one do we commonly use ? Depends on what you need. I go with DbAcl myself. -- jon bennett -www.jben.net- blog.jben.net Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
(Acl) Error: aro not found No tree returned.
Hi everyone, While working on the sample provided from cookbook (link below) I was going to create an aro where the codes are to be placed in a controller. I chose users_controller.php and I then verify by typing on my console: cake acl view aro It resulted in Error: aro not found No tree returned. What's wrong with it ? http://book.cakephp.org/view/1245/Defining-Permissions-Cake-s-Database-ACL Regards, Maxim Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: (Acl) Error: aro not found No tree returned.
Hi, Have you executed the code in anyAction() to populate ACL tables with dummy data, something like http:// your-domain-here/your-app-name-here/users/anyAction? Amit Badkas PHP Applications for E-Biz: http://www.sanisoft.com On Thu, Dec 30, 2010 at 8:39 PM, John Maxim goog...@gmail.com wrote: Hi everyone, While working on the sample provided from cookbook (link below) I was going to create an aro where the codes are to be placed in a controller. I chose users_controller.php and I then verify by typing on my console: cake acl view aro It resulted in Error: aro not found No tree returned. What's wrong with it ? http://book.cakephp.org/view/1245/Defining-Permissions-Cake-s-Database-ACL Regards, Maxim Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.comFor more options, visit this group at http://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: (Acl) Error: aro not found No tree returned.
Hi Amit...thanks for the reply but.. I don't understand. In my Users, there is no file named by anyAction.. anyAction function was saved in /controllers/users_controller.php What do you mean ?.. best regards, Maxim On Dec 31, 11:33 am, Amit Badkas amit.sanis...@gmail.com wrote: Hi, Have you executed the code in anyAction() to populate ACL tables with dummy data, something like http:// your-domain-here/your-app-name-here/users/anyAction? Amit Badkas PHP Applications for E-Biz:http://www.sanisoft.com On Thu, Dec 30, 2010 at 8:39 PM, John Maxim goog...@gmail.com wrote: Hi everyone, While working on the sample provided from cookbook (link below) I was going to create an aro where the codes are to be placed in a controller. I chose users_controller.php and I then verify by typing on my console: cake acl view aro It resulted in Error: aro not found No tree returned. What's wrong with it ? http://book.cakephp.org/view/1245/Defining-Permissions-Cake-s-Databas... Regards, Maxim Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.comFor more options, visit this group at http://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: (Acl) Error: aro not found No tree returned.
Hi, I meant that you need to access the method myAction() from URL so that the code in that method will get executed and according to that code, the dummy records will get populated to 'aros' table. Amit Badkas PHP Applications for E-Biz: http://www.sanisoft.com On Fri, Dec 31, 2010 at 9:40 AM, John Maxim goog...@gmail.com wrote: Hi Amit...thanks for the reply but.. I don't understand. In my Users, there is no file named by anyAction.. anyAction function was saved in /controllers/users_controller.php What do you mean ?.. best regards, Maxim On Dec 31, 11:33 am, Amit Badkas amit.sanis...@gmail.com wrote: Hi, Have you executed the code in anyAction() to populate ACL tables with dummy data, something like http:// your-domain-here/your-app-name-here/users/anyAction? Amit Badkas PHP Applications for E-Biz:http://www.sanisoft.com On Thu, Dec 30, 2010 at 8:39 PM, John Maxim goog...@gmail.com wrote: Hi everyone, While working on the sample provided from cookbook (link below) I was going to create an aro where the codes are to be placed in a controller. I chose users_controller.php and I then verify by typing on my console: cake acl view aro It resulted in Error: aro not found No tree returned. What's wrong with it ? http://book.cakephp.org/view/1245/Defining-Permissions-Cake-s-Databas. .. Regards, Maxim Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.com cake-php%2bunsubscr...@googlegroups.comcake-php%252bunsubscr...@googlegroups.comFor more options, visit this group at http://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.comFor more options, visit this group at http://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: (Acl) Error: aro not found No tree returned.
I tried executing by going to url: localhost/my_app_name/users/ anyAction can't load it asks me to check and make sure my file anyaction.ctp is created in views/users regards, maxim On Dec 31, 12:42 pm, Amit Badkas amit.sanis...@gmail.com wrote: Hi, I meant that you need to access the method myAction() from URL so that the code in that method will get executed and according to that code, the dummy records will get populated to 'aros' table. Amit Badkas PHP Applications for E-Biz:http://www.sanisoft.com On Fri, Dec 31, 2010 at 9:40 AM, John Maxim goog...@gmail.com wrote: Hi Amit...thanks for the reply but.. I don't understand. In my Users, there is no file named by anyAction.. anyAction function was saved in /controllers/users_controller.php What do you mean ?.. best regards, Maxim On Dec 31, 11:33 am, Amit Badkas amit.sanis...@gmail.com wrote: Hi, Have you executed the code in anyAction() to populate ACL tables with dummy data, something like http:// your-domain-here/your-app-name-here/users/anyAction? Amit Badkas PHP Applications for E-Biz:http://www.sanisoft.com On Thu, Dec 30, 2010 at 8:39 PM, John Maxim goog...@gmail.com wrote: Hi everyone, While working on the sample provided from cookbook (link below) I was going to create an aro where the codes are to be placed in a controller. I chose users_controller.php and I then verify by typing on my console: cake acl view aro It resulted in Error: aro not found No tree returned. What's wrong with it ? http://book.cakephp.org/view/1245/Defining-Permissions-Cake-s-Databas. .. Regards, Maxim Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.com cake-php%2bunsubscr...@googlegroups.comcake-php%252bunsubscr...@googlegroups.comFor more options, visit this group at http://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.comFor more options, visit this group at http://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: (Acl) Error: aro not found No tree returned.
Hi, Add following code at the end of myAction() method, so that it won't try to render the view $this-render(false); Also look at the SQL queries if 'aros' table is populating correctly or not by setting debug level to 2. Hope this helps. Amit Badkas PHP Applications for E-Biz: http://www.sanisoft.com On Fri, Dec 31, 2010 at 11:52 AM, John Maxim goog...@gmail.com wrote: I tried executing by going to url: localhost/my_app_name/users/ anyAction can't load it asks me to check and make sure my file anyaction.ctp is created in views/users regards, maxim On Dec 31, 12:42 pm, Amit Badkas amit.sanis...@gmail.com wrote: Hi, I meant that you need to access the method myAction() from URL so that the code in that method will get executed and according to that code, the dummy records will get populated to 'aros' table. Amit Badkas PHP Applications for E-Biz:http://www.sanisoft.com On Fri, Dec 31, 2010 at 9:40 AM, John Maxim goog...@gmail.com wrote: Hi Amit...thanks for the reply but.. I don't understand. In my Users, there is no file named by anyAction.. anyAction function was saved in /controllers/users_controller.php What do you mean ?.. best regards, Maxim On Dec 31, 11:33 am, Amit Badkas amit.sanis...@gmail.com wrote: Hi, Have you executed the code in anyAction() to populate ACL tables with dummy data, something like http:// your-domain-here/your-app-name-here/users/anyAction? Amit Badkas PHP Applications for E-Biz:http://www.sanisoft.com On Thu, Dec 30, 2010 at 8:39 PM, John Maxim goog...@gmail.com wrote: Hi everyone, While working on the sample provided from cookbook (link below) I was going to create an aro where the codes are to be placed in a controller. I chose users_controller.php and I then verify by typing on my console: cake acl view aro It resulted in Error: aro not found No tree returned. What's wrong with it ? http://book.cakephp.org/view/1245/Defining-Permissions-Cake-s-Databas. .. Regards, Maxim Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.com cake-php%2bunsubscr...@googlegroups.comcake-php%252bunsubscr...@googlegroups.com cake-php%2bunsubscr...@googlegroups.comcake-php%252bunsubscr...@googlegroups.com cake-php%252bunsubscr...@googlegroups.comcake-php%25252bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.com cake-php%2bunsubscr...@googlegroups.comcake-php%252bunsubscr...@googlegroups.comFor more options, visit this group at http://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.comFor more options, visit this group at http://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Urgent, help: Setting up permission to allow aro to access aco (problem)
Hi I'm stuck right here: http://book.cakephp.org/view/1550/Setting-up-permissions I don't know how to set the permission right, can anyone point this out? Is it either we can do one way or both ? (1) grant aronode aconode [aco_action] or all Use this command to grant ACL permissions. Once executed, the ARO specified (and its children, if any) will have ALLOW access to the specified ACO action (and the ACO's children, if any). For more detailed parameter usage info, see help for the 'create' command. (2) this line of code is it placed in app_controller.php ? $this-Acl-allow($aroAlias, $acoAlias); ~~ I don't know at all how to run permission with shell. It gave error like: c:\wamp\www\appcake acl grant $aroAlias $acoAlias all PHP Warning: DbAcl::allow() - Invalid node in C:\wamp\www\cake\libs \controller\components\acl.php on line 361 Warning: DbAcl::allow() - Invalid node in C:\wamp\www\cake\libs \controller\components\acl.php on line 361 Permission was not granted. Any help with this? ~ Regards, thanks. Maxim Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
DbAcl Failed ARO/ACO node lookup (SOLVED accidentally)
~~ERROR msg~~ Warning (512): DbAcl::check() - Failed ARO/ACO node lookup in permissions check. Node references: Aro: User::44 Aco: Post [CORE\cake\libs\controller\components\acl.php, line 273] ~~ The error is shown above. I solved this accidentally, maybe someone could rectify if my solution is correct? The full story how I ended up with this error can be read here: http://groups.google.com/group/cake-php/browse_thread/thread/478daa30a5c26e18 Suggestion to repopulate the Acl tables was not attempted before I could, I solved it when reading cookbook here: http://book.cakephp.org/view/1244/Defining-Permissions-Cake-s-INI-based-ACL Extracted from cookbook: ~~ //Change these lines: Configure::write('Acl.classname', 'DbAcl'); Configure::write('Acl.database', 'default'); //To look like this: Configure::write('Acl.classname', 'IniAcl'); //Configure::write('Acl.database', 'default'); ~~ Suggestion(s) ? Regards, Maxim Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
ACL Aro id problem
Hi The field aro_id in table aros_acos is the id of the aro or the foreign key of the aro?. The allow method of the acl componet creates the rows with the aro id, but that dont work, in the groups case, only work if the aro id and the foreign key are equals, however if are diferent dont work, but if i replace the aro id with the id of the group work perfect. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: ACL Aro id problem
aros_acos.aro_id is the FK pointing to aros.id, while the FK point to your Group would be aros.foreign_key. On Tue, Dec 21, 2010 at 3:06 PM, hcentelles hcentel...@gmail.com wrote: Hi The field aro_id in table aros_acos is the id of the aro or the foreign key of the aro?. The allow method of the acl componet creates the rows with the aro id, but that dont work, in the groups case, only work if the aro id and the foreign key are equals, however if are diferent dont work, but if i replace the aro id with the id of the group work perfect. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
can a group act as both an ARO and an ACO?
I apologize for asking this before trying. I haven't yet had time to get to this and I'm curious if there's a quick answer that will save me some time. Otherwise, I will test it out and report back later. Question: A user belongs to one or more departments. Projects belong to a department. Any user that belongs to department A should be able to access any projects that belong to department A. Conversely, the user should not be allowed to access any projects that belong to a department the user is not also a part of. I wanted to see if I could define the behavior for department to act as both an ACO and an ARO so that it updates the ACOs and AROs automatically whenever a department is created or updated. *** Bonus points: My ACL is actually more complicated than that. The user belongs to a user group as well as a department. The group defines what CRUD actions the user can do in absolute terms. For example, admins are allowed to create and edit company records, but users can only view them. What makes it more complicated is that AMONG those absolute permissions, which specific records you are allowed to edit or view are filtered by the department criteria above. So the user belongs to one or more departments, and the user belongs to a single group. Access is dependent on both department AND group. That means in the ARO table, I would see the same user appear under two different branches (one branch is for all departments, and the other is for all groups). The trouble is that I predict this means ACL will see the user in either one OR the other and give much higher permission than desired. In short, I'm hoping for an AND link but expecting it will only do OR. Super bonus points: My ACL is currently keyed off of just group. I see that ACL queries easily outweigh all other queries in terms of time eaten up. I'm wondering if, even were I to succeed in making my complex ACL tree above work correctly, would the performance hit make it infeasible? Should I just hardcode some things instead? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: can a group act as both an ARO and an ACO?
So the answer to my first question is that apparently you can't use actsAs = array('Acl' ...) and define more than one form of 'Acl' -- I tried every combination of nested arrays I could think of and it never worked. It looks like I have to choose one (in my case that will be the ARO table), and then manually update the other (ACO) in the controller. Next up: can I get the groups to work with the departments as AND permission conditions? If anyone has any insights to share, please do. On Sep 28, 10:14 am, calzone calz...@gmail.com wrote: I apologize for asking this before trying. I haven't yet had time to get to this and I'm curious if there's a quick answer that will save me some time. Otherwise, I will test it out and report back later. Question: A user belongs to one or more departments. Projects belong to a department. Any user that belongs to department A should be able to access any projects that belong to department A. Conversely, the user should not be allowed to access any projects that belong to a department the user is not also a part of. I wanted to see if I could define the behavior for department to act as both an ACO and an ARO so that it updates the ACOs and AROs automatically whenever a department is created or updated. *** Bonus points: My ACL is actually more complicated than that. The user belongs to a user group as well as a department. The group defines what CRUD actions the user can do in absolute terms. For example, admins are allowed to create and edit company records, but users can only view them. What makes it more complicated is that AMONG those absolute permissions, which specific records you are allowed to edit or view are filtered by the department criteria above. So the user belongs to one or more departments, and the user belongs to a single group. Access is dependent on both department AND group. That means in the ARO table, I would see the same user appear under two different branches (one branch is for all departments, and the other is for all groups). The trouble is that I predict this means ACL will see the user in either one OR the other and give much higher permission than desired. In short, I'm hoping for an AND link but expecting it will only do OR. Super bonus points: My ACL is currently keyed off of just group. I see that ACL queries easily outweigh all other queries in terms of time eaten up. I'm wondering if, even were I to succeed in making my complex ACL tree above work correctly, would the performance hit make it infeasible? Should I just hardcode some things instead? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: can a group act as both an ARO and an ACO?
It doesn't look like what I'm seeking is possible with cake's ACL. Am I wrong? This seems like it should be a common use of ACL: Let's say you work for CRM R Us and have a multi-corporate CRM app: John is a Client Manager who works in Marketing for IBM (usergroup = Manager) Rob is an Artist who works in Marketing for IBM (usergroup = User) Janet is a Parts Manager who works in Parts Warehouse for IBM (usergroup = Manager) Bill is a Client Manager who works in Sales for Coca Cola (usergroup = Manager) Sally is a Client Executive who works in Sales for Coca Cola (usergroup = Manager) Fred is an Executive Travel Assistant who also works in Sales for Coca Cola (usergroup = User) Jennifer works is a Support Technician in IT for CRM R Us (usergroup = Admin) John can create and edit contacts and companies that belong as customers to IBM Rob can only view companies that belong as customers to IBM Janet can view but not edit, only companies and contacts that belong as SUPPLIERS to IBM Bill can create and edit contacts and companies that belong as customers to Coca Cola Sally can also create and edit contacts and companies that belong as customers to Coca Cola Fred can view but not edit contacts and companies that belong as vendors to Coca Cola Jennifer can view but not edit all contacts and companies both suppliers and customers for both IBM and Coca Cola So for ACL to handle this correctly, it would need to support having AROs exist in more than one group (three in this case, Company, Department, and UserGroup) and then it needs support having ACOs exist in more than one group (two in this case: companies and contacts would be categorized under both Company and Department), and then grant access based on examining the permissions for all instances of the ARO. In other words, from the example above: John's user id is found under three separate ARO groups: Company/IBM, Department/Marketing, UserGroup/Manager When pulling up, say, a contact record in the application, in order to determine if John has access, we need to see if the record is also under Company/IBM and Department/Marketing. The final piece of the puzzle then is examining what kind of access UserGroup/Manager has on contact records. From trying to get ACL working the way I want, it sure doesn't look like it supports something like that. On Sep 28, 2:18 pm, calzone calz...@gmail.com wrote: So the answer to my first question is that apparently you can't use actsAs = array('Acl' ...) and define more than one form of 'Acl' -- I tried every combination of nested arrays I could think of and it never worked. It looks like I have to choose one (in my case that will be the ARO table), and then manually update the other (ACO) in the controller. Next up: can I get the groups to work with the departments as AND permission conditions? If anyone has any insights to share, please do. On Sep 28, 10:14 am, calzone calz...@gmail.com wrote: I apologize for asking this before trying. I haven't yet had time to get to this and I'm curious if there's a quick answer that will save me some time. Otherwise, I will test it out and report back later. Question: A user belongs to one or more departments. Projects belong to a department. Any user that belongs to department A should be able to access any projects that belong to department A. Conversely, the user should not be allowed to access any projects that belong to a department the user is not also a part of. I wanted to see if I could define the behavior for department to act as both an ACO and an ARO so that it updates the ACOs and AROs automatically whenever a department is created or updated. *** Bonus points: My ACL is actually more complicated than that. The user belongs to a user group as well as a department. The group defines what CRUD actions the user can do in absolute terms. For example, admins are allowed to create and edit company records, but users can only view them. What makes it more complicated is that AMONG those absolute permissions, which specific records you are allowed to edit or view are filtered by the department criteria above. So the user belongs to one or more departments, and the user belongs to a single group. Access is dependent on both department AND group. That means in the ARO table, I would see the same user appear under two different branches (one branch is for all departments, and the other is for all groups). The trouble is that I predict this means ACL will see the user in either one OR the other and give much higher permission than desired. In short, I'm hoping for an AND link but expecting it will only do OR. Super bonus points: My ACL is currently keyed off of just group. I see that ACL queries easily outweigh all other queries in terms of time eaten up. I'm wondering if, even were I to succeed in making my complex ACL tree above work correctly, would
Re: Ebook : CakePHP 1.3 ACL ACO/ARO Control Panel
I just downloaded it. It looks nice, but I would like to have it in English! =) 2010/8/20 Azril Nazli azril.na...@gmail.com Those who can understand Bahasa Melayu language ( probably who's living in Indonesia,Malaysia,Brunei ) , can read the book. But I use a lot of screenshots in English, so probably you can follow the tutorial This book is all about building Control Panel to 1. Manage ACOs 2. Assign Permission to AROs ( users ) to ACOs ( Controllers/Action ) Language : Bahasa Melayu ScribD : http://www.scribd.com/doc/36175172/CakePHPPanelKawalanACL-AzrilNazli Azril Nazli Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.comFor more options, visit this group at http://groups.google.com/group/cake-php?hl=en -- [-=K¥KØ=-] =) Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Ebook : CakePHP 1.3 ACL ACO/ARO Control Panel
Very nice.. Publish it in google docs... so we can translate to english... (i guess).. Congratz! -- Renato de Freitas Freire ren...@morfer.org On Mon, Aug 23, 2010 at 9:37 PM, Kyko kykoc...@gmail.com wrote: I just downloaded it. It looks nice, but I would like to have it in English! =) 2010/8/20 Azril Nazli azril.na...@gmail.com Those who can understand Bahasa Melayu language ( probably who's living in Indonesia,Malaysia,Brunei ) , can read the book. But I use a lot of screenshots in English, so probably you can follow the tutorial This book is all about building Control Panel to 1. Manage ACOs 2. Assign Permission to AROs ( users ) to ACOs ( Controllers/Action ) Language : Bahasa Melayu ScribD : http://www.scribd.com/doc/36175172/CakePHPPanelKawalanACL-AzrilNazli Azril Nazli Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.comFor more options, visit this group at http://groups.google.com/group/cake-php?hl=en -- [-=K¥KØ=-] =) Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.comFor more options, visit this group at http://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Ebook : CakePHP 1.3 ACL ACO/ARO Control Panel
Those who can understand Bahasa Melayu language ( probably who's living in Indonesia,Malaysia,Brunei ) , can read the book. But I use a lot of screenshots in English, so probably you can follow the tutorial This book is all about building Control Panel to 1. Manage ACOs 2. Assign Permission to AROs ( users ) to ACOs ( Controllers/Action ) Language : Bahasa Melayu ScribD : http://www.scribd.com/doc/36175172/CakePHPPanelKawalanACL-AzrilNazli Azril Nazli Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Model like both ACO and ARO in ACL
Hi is it possible use a model in Acl both ARO and ACO? Thanks Marco Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Model like both ACO and ARO in ACL
Can someone some suggestion for me? Thanks On 29 Lug, 09:41, marco.rizze...@gmail.com marco.rizze...@gmail.com wrote: Hi is it possible use a model in Acl both ARO and ACO? Thanks Marco Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Model like both ACO and ARO in ACL
On Jul 29, 1:16 pm, marco.rizze...@gmail.com marco.rizze...@gmail.com wrote: Can someone some suggestion for me? Yes. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Model like both ACO and ARO in ACL
I didn't find any predefined way to set the model as both Aco Aro, so I made it Aco only and I added some code to afterSave() (when $created is true) and beforeDelete() callbacks wich creates and deletes aro nodes. On 29 Lip, 13:16, marco.rizze...@gmail.com marco.rizze...@gmail.com wrote: Can someone some suggestion for me? Thanks On 29 Lug, 09:41, marco.rizze...@gmail.com marco.rizze...@gmail.com wrote: Hi is it possible use a model in Acl both ARO and ACO? Thanks Marco Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Model like both ACO and ARO in ACL
Can you tell me how the model has to be configurated? On 29 Lug, 15:04, AD7six andydawso...@gmail.com wrote: On Jul 29, 1:16 pm, marco.rizze...@gmail.com marco.rizze...@gmail.com wrote: Can someone some suggestion for me? Yes. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Model like both ACO and ARO in ACL
On Jul 29, 4:32 pm, marco.rizze...@gmail.com marco.rizze...@gmail.com wrote: Can you tell me how the model has to be configurated? well, I misread your question. I don't think the core behavior will allow act as both however you can just follow xander's lead. hth, AD Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Couldn't find Aro node
Hi guys, I'm just starting with cakePHP so don't shoot me if this is a stupid question :) I'm setting up a login system using ACL and Auth and have a table with users, groups and then the acos, aros and aro_acos tables. The ARO objects refer to the groups (so the aro records have a foreign key to a group and the model is 'Group') If I want to test my permissions I get following error: Warning (512): AclNode::node() - Couldn't find Aro node identified by Array ( [Aro0.model] = User [Aro0.foreign_key] = 4 ) [CORE/cake/libs/model/db_acl.php, line 191] Warning (512): DbAcl::check() - Failed ARO/ACO node lookup in permissions check. Node references: Aro: Array ( [User] = Array ( [id] = 4 [username] = Jerre [active] = 1 [group_id] = 4 [created] = -00-00 00:00:00 [modified] = -00-00 00:00:00 ) ) So it looks like it want's to authenticate the user in stead of the group, any ideas what I might be missing here? Thanks Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: How to Prevent Creation of Records in the Aro Table?
Make sure that you set the model id (the primary key of the user record) before you use saveField! Enjoy, John On Jun 28, 10:41 pm, randy ran...@gmail.com wrote: I am struggling with some Auth/Acl issues at the moment...specifically this. I have a basic Users/Groups setup, I'd like to NOT keep a record in the aros table for each user, and instead rely on Groups to determine permissions. I've got some code which creates a one-time password for Users when they've lost their password and would like to reset it. When I run this code and change their password using the saveField() method, I find it is writing a row to my aros table for the User. Is there a way to prevent this from happening? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
How to Prevent Creation of Records in the Aro Table?
I am struggling with some Auth/Acl issues at the moment...specifically this. I have a basic Users/Groups setup, I'd like to NOT keep a record in the aros table for each user, and instead rely on Groups to determine permissions. I've got some code which creates a one-time password for Users when they've lost their password and would like to reset it. When I run this code and change their password using the saveField() method, I find it is writing a row to my aros table for the User. Is there a way to prevent this from happening? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Basic ACL question; Why have all users in the ARO?
try this : http://book.cakephp.org/view/465/Understanding-How-ACL-Works sometimes, maybe you will need to create groups for users but in those groups there will must be some users, who have special - premium acces ... 2010/3/23 xtraorange xtraora...@gmail.com: Howdy all, Maybe someone can explain this to me, because I'm just having trouble understanding: In the tutorial (http://book.cakephp.org/view/641/Simple-Acl- controlled-Application) the author seems to be suggesting that all users should be listed in the ARO table (and their group updated as needed). The thing that I don't understand about this is why? Wouldn't it make more sense to just list the users that need special permission, and for everyone else just check what their group_id is in the user table, and use said for their permission levels? I doubt I'll even have one user that will need a different set of permissions other than what the groups will be set to... so is it really necessary to list all my users in that table? What's the advantage there? Thanks! James Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en To unsubscribe from this group, send email to cake-php+unsubscribegooglegroups.com or reply to this email with the words REMOVE ME as the subject. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en To unsubscribe from this group, send email to cake-php+unsubscribegooglegroups.com or reply to this email with the words REMOVE ME as the subject.
Re: Basic ACL question; Why have all users in the ARO?
It's entirely possible that I may have misread or misunderstood that example.. but it seemed to me like all the users were again in the ARO table. Did I not read that right? What I should really do is rephrase my question: Is there a tutorial that would guide me on use the ACL without adding every one of my users (which there will be a ton of) into the ARO table needlessly? Instead I'd like to just add the ones that need special permissions that exceed group permissions (if there are any at all). Is this possible and where could I find a guide on it? :) Thanks, James On Mar 23, 2:57 am, Martin Duris mato.du...@gmail.com wrote: try this :http://book.cakephp.org/view/465/Understanding-How-ACL-Works sometimes, maybe you will need to create groups for users but in those groups there will must be some users, who have special - premium acces ... 2010/3/23 xtraorange xtraora...@gmail.com: Howdy all, Maybe someone can explain this to me, because I'm just having trouble understanding: In the tutorial (http://book.cakephp.org/view/641/Simple-Acl- controlled-Application) the author seems to be suggesting that all users should be listed in the ARO table (and their group updated as needed). The thing that I don't understand about this is why? Wouldn't it make more sense to just list the users that need special permission, and for everyone else just check what their group_id is in the user table, and use said for their permission levels? I doubt I'll even have one user that will need a different set of permissions other than what the groups will be set to... so is it really necessary to list all my users in that table? What's the advantage there? Thanks! James Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/cake-php?hl=en To unsubscribe from this group, send email to cake-php+unsubscribegooglegroups.com or reply to this email with the words REMOVE ME as the subject. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en To unsubscribe from this group, send email to cake-php+unsubscribegooglegroups.com or reply to this email with the words REMOVE ME as the subject.
Basic ACL question; Why have all users in the ARO?
Howdy all, Maybe someone can explain this to me, because I'm just having trouble understanding: In the tutorial (http://book.cakephp.org/view/641/Simple-Acl- controlled-Application) the author seems to be suggesting that all users should be listed in the ARO table (and their group updated as needed). The thing that I don't understand about this is why? Wouldn't it make more sense to just list the users that need special permission, and for everyone else just check what their group_id is in the user table, and use said for their permission levels? I doubt I'll even have one user that will need a different set of permissions other than what the groups will be set to... so is it really necessary to list all my users in that table? What's the advantage there? Thanks! James Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en To unsubscribe from this group, send email to cake-php+unsubscribegooglegroups.com or reply to this email with the words REMOVE ME as the subject.
Re: ACL - aco/aro creation help
From: http://book.cakephp.org/view/648/Setting-up-permissions $group = $this-User-Group; //Allow superadmins to everything $group-id = 1; //if superadmins have $id = 1; $this-Acl-allow($group, 'controllers'); //allow admins $group-id = 2; $this-Acl-allow($group, 'controllers'); $this-Acl-deny($group, 'controllers/Users/new_admin'); //allow users to only add and edit on posts and widgets $group-id = 3; $this-Acl-deny($group, 'controllers'); $this-Acl-allow($group, 'controllers/YourController/ new_dealer'); $this-Acl-allow($group, 'controllers/YourController/ add_review'); and so on All actions accessible by all users should be defined in beforeFilter in each controller: $this-Auht-allow('search', ... ); Hope this helps On Dec 8, 8:05 am, gautam lakum lakum7...@gmail.com wrote: Hi all, I am using ACL with my cakePHP application. I want to assign permissions to the users. I have groups table, in which I have 3 types of groups called 1. superadmin 2. admin 3. member The permissions are like superadmin can access all the controllers actions, admin can also access all the actions but can't access new_admin action. new_admin can be accessed only by super admin. members can't access admin actions. They can access only login, logout, search, profile, new_dealer, add_review actions. So please help me, what should be there in aros and acos table. and also aros_acos table. I am too much confused. If possible, please reply with some easy example. I found some e.g. but they were confusing me. Thank you. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
ACL - aco/aro creation help
Hi all, I am using ACL with my cakePHP application. I want to assign permissions to the users. I have groups table, in which I have 3 types of groups called 1. superadmin 2. admin 3. member The permissions are like superadmin can access all the controllers actions, admin can also access all the actions but can't access new_admin action. new_admin can be accessed only by super admin. members can't access admin actions. They can access only login, logout, search, profile, new_dealer, add_review actions. So please help me, what should be there in aros and acos table. and also aros_acos table. I am too much confused. If possible, please reply with some easy example. I found some e.g. but they were confusing me. Thank you. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: AclNode::node() - Couldn't find Aro node identified by Array ( [Aro0.model] = Group [Aro0.foreign_key] = 1 )
On Oct 29, 7:24 pm, merrylin shi shimeilin1...@gmail.com wrote: I am sure using the Auth Compoment and ACL Component ! I think I do All things about Auth and Acl , but not take effect are you already insert requested object into aros table ? based on your warning message, you should have one row in your aros table which is model=group and foreign_key=1 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
AclNode::node() - Couldn't find Aro node identified by Array ( [Aro0.model] = Group [Aro0.foreign_key] = 1 )
when I do Auth with cake , I happened a problem Warning (512): AclNode::node() - Couldn't find Aro node identified by Array ( [Aro0.model] = Group [Aro0.foreign_key] = 1 ) [CORE\cake\libs\model\db_acl.php, line 191] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: AclNode::node() - Couldn't find Aro node identified by Array ( [Aro0.model] = Group [Aro0.foreign_key] = 1 )
On 29 Okt., 10:08, merrylin shimeilin1...@gmail.com wrote: when I do Auth with cake , I happened a problem Warning (512): AclNode::node() - Couldn't find Aro node identified by Array ( [Aro0.model] = Group [Aro0.foreign_key] = 1 ) [CORE\cake\libs\model\db_acl.php, line 191] Hey, are you using only the Auth Compoment? Or did you try to use the ACL Component too? The error comes from the ARO Object and the ACL Component. For better help, try to post the controller code including the beforeFilter method and the component variable. Or maybe this link is going to help you: http://book.cakephp.org/view/171/Access-Control-Lists matic --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: AclNode::node() - Couldn't find Aro node identified by Array ( [Aro0.model] = Group [Aro0.foreign_key] = 1 )
I am sure using the Auth Compoment and ACL Component ! I think I do All things about Auth and Acl , but not take effect --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Cake app that manages ACL (ARO/ACO)
There is one plugin for ACL-Management through a GUI: http://dev.newnewmedia.com/cakephp/admin/acl Perhaps there exist other solutions? On Sep 15, 4:01 am, takabanana ttorim...@gmail.com wrote: Is there an open source (or publicly available) CakePHP app that does the management of standard Cake 1.2 ACL ARO/ACO data through a web GUI? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Cake app that manages ACL (ARO/ACO)
Is there an open source (or publicly available) CakePHP app that does the management of standard Cake 1.2 ACL ARO/ACO data through a web GUI? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
ACL: how to get ARO associated model records given an ACO
Hi, I'm a relative nooob to cakephp so this may be obvious to someone but its not hitting me in the face. I have setup ACL, and have User and Group models acting as requestors (so when I insert a user or group the ARO table is updated). What I want to do is show the details of the ARO's for a given ACO. I get the ARO records ok, however I want some extra info from the associated model (User or Group) and I can't see a way to do this. The problem I am having is that in the ARO record the model field will contain either 'User' or 'Group' and based on this I want to get data from either the User or Group model (table) - how do I or how can I get cake to get the respecitive record from the correct Model (User or Group)? The rough flow I'm after is: acos-aros_acos-aros-(this is where my issue is) users or groups Thanks in advance. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
ACO / ARO
If using UUID's as primary key do I then have to edit foreign_key in AROS table to CHAR(36)? What about other fields in ACOS / AROS / AROS_ACOS? Thanks Dave --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Custom methods for Aro and Aco models?
In an attempt to utilize my own ACL system, I have 3 models which I created: - Aro - Aco - AclPermission Each of these correlates with the default Cake ACL tables (aros, acos, aros_acos, respectively). Now I'm trying to write some custom methods in these models but having no luck. When attempting to access my custom method through a controller model chain (NOT AuthComponent), I get the following error: 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'getAros' at line 1 In other words, even though I have a method named getAros(), I can't call it. I'm happy to provide code if anyone is interested. I'm just wondering if maybe I should call my Aro and Aco models different names. I'm guessing they are automatically built-in and Cake is disallowing me to customize their methods. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Custom methods for Aro and Aco models?
Looks like it's a bad idea to create handmade models named Aro and Aco. When I change the model names (still referencing the default Cake tables aros and acos, though), then I'm able to get the expected results from my custom methods and properties. I chose AclRequester and AclControlled as my model names. The only downside (so far), is that I lose the AclNode functionality. So I'm manually bundling that in my own custom behavior. On Jun 3, 6:34 am, etipaced kevindecap...@gmail.com wrote: In an attempt to utilize my own ACL system, I have 3 models which I created: - Aro - Aco - AclPermission Each of these correlates with the default Cake ACL tables (aros, acos, aros_acos, respectively). Now I'm trying to write some custom methods in these models but having no luck. When attempting to access my custom method through a controller model chain (NOT AuthComponent), I get the following error: 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'getAros' at line 1 In other words, even though I have a method named getAros(), I can't call it. I'm happy to provide code if anyone is interested. I'm just wondering if maybe I should call my Aro and Aco models different names. I'm guessing they are automatically built-in and Cake is disallowing me to customize their methods. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: What do ARO and ACO stand for?
ARO - access request object ACO - access control object. On Apr 5, 1:56 pm, bearlee brianleeu...@gmail.com wrote: It a novice quesiton, but these acronyms bother me if I don't know what they mean (my pet-peeves). What do ARO and ACO stand for? -Brian --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: What do ARO and ACO stand for?
Important tutorial on ACL : http://brolly.ca/blog/web-development/cakephp-acl-tutorial/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
What do ARO and ACO stand for?
It a novice quesiton, but these acronyms bother me if I don't know what they mean (my pet-peeves). What do ARO and ACO stand for? -Brian --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: What do ARO and ACO stand for?
http://book.cakephp.org/view/465/Understanding-How-ACL-Works Answers are drawing near.. On Apr 5, 8:56 pm, bearlee brianleeu...@gmail.com wrote: It a novice quesiton, but these acronyms bother me if I don't know what they mean (my pet-peeves). What do ARO and ACO stand for? -Brian --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Getting all the acos a aro can access?
I asked the same question somewhere once. I was pretty much told since the ACL is mptt, that I would have to loop through each object and check it that way. That's what I'm doing. The performance isn't the best especially in our local development environments, but our production server is pretty beefy, so I don't really notice any performance issues. Not sure how it'll hold up as the ACL grows though. On Nov 29, 4:35 am, gk [EMAIL PROTECTED] wrote: Hi there I'm trying to work out how to get all the access control objects an access request object can access - for example all the blog posts a user can edit. Can anybody point me in the right direction on how to do this? Thanks very much. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com 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 -~--~~~~--~~--~--~---
Re: Getting all the acos a aro can access?
On Dec 2, 10:38 am, AD7six [EMAIL PROTECTED] wrote: gk wrote: Hi there I'm trying to work out how to get all the access control objects an access request object can access - for example all the blog posts a user can edit. Can anybody point me in the right direction on how to do this? Thanks very much. If you can't make some assumptions, it's very expensive to do that. Before commencing you need to understand the basics of mptt, and also understand that acl is basically a tree-habtm-tree system. If you don't meet these 2 requirements - research first, try later ;). The sql you need to achieve is something like this: SELECT theAco.foreign_key FROM acos as theAco INNER JOIN acos as ruleAco ON (ruleAco.lft = theAco.lft AND ruleAco.rght = theAco.rght) INNER JOIN aros_acos ON (aros_acos.aco_id = ruleAco.id) INNER JOIN aros as ruleAro ON (aros_acos.aro_id = ruleAro.id) INNER JOIN aros as theAro ON (ruleAro.lft = theAro.lft AND ruleAro.rght = theAro.rght) WHERE theAro.class = 'User' AND theAro.foreign_key = $userId AND ruleAco.edit = 1 AND theAco.class = 'Post'; Where: theAco represents in the above example the aco for *a* blog post ruleAco represents the aco for a matching rule, which could be the same as theAco or any parent (such as the aco for all posts, or all objects) aros_acos is the permission table ruleAro represents the aro for a matching rule, which could be the same as theAro or any parent (such as the aro for all users) theAro represents the specific user As you can see, it's not trivial, and on even a moderate dataset is likely to really pound your db - to the point of taking it offline. So if you are using acl inappropriately (e.g. to define only admin and owners can edit posts) It would be wise to reconsider your access control scheme, rather than try to implement the above. Off the cuff, IMO and hth, AD As the sql is hard to read, I put it here: http://bin.cakephp.org/view/1223405007 After checking the syntax etc. As mentioned use with caution. AD --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com 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 -~--~~~~--~~--~--~---
Re: Getting all the acos a aro can access?
gk wrote: Hi there I'm trying to work out how to get all the access control objects an access request object can access - for example all the blog posts a user can edit. Can anybody point me in the right direction on how to do this? Thanks very much. If you can't make some assumptions, it's very expensive to do that. Before commencing you need to understand the basics of mptt, and also understand that acl is basically a tree-habtm-tree system. If you don't meet these 2 requirements - research first, try later ;). The sql you need to achieve is something like this: SELECT theAco.foreign_key FROM acos as theAco INNER JOIN acos as ruleAco ON (ruleAco.lft = theAco.lft AND ruleAco.rght = theAco.rght) INNER JOIN aros_acos ON (aros_acos.aco_id = ruleAco.id) INNER JOIN aros as ruleAro ON (aros_acos.aro_id = ruleAro.id) INNER JOIN aros as theAro ON (ruleAro.lft = theAro.lft AND ruleAro.rght = theAro.rght) WHERE theAro.class = 'User' AND theAro.foreign_key = $userId AND ruleAco.edit = 1 AND theAco.class = 'Post'; Where: theAco represents in the above example the aco for *a* blog post ruleAco represents the aco for a matching rule, which could be the same as theAco or any parent (such as the aco for all posts, or all objects) aros_acos is the permission table ruleAro represents the aro for a matching rule, which could be the same as theAro or any parent (such as the aro for all users) theAro represents the specific user As you can see, it's not trivial, and on even a moderate dataset is likely to really pound your db - to the point of taking it offline. So if you are using acl inappropriately (e.g. to define only admin and owners can edit posts) It would be wise to reconsider your access control scheme, rather than try to implement the above. Off the cuff, IMO and hth, AD --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com 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 -~--~~~~--~~--~--~---
Re: Getting all the acos a aro can access?
I did it in a brue force way:), so i am intersted in a smooth solution too.:) 2008/12/1 dr. Hannibal Lecter [EMAIL PROTECTED] I'd like to know this too.. I didn't get the time to look into it in detail, but when I do and if I manage to find a solution I'll post it here. On Nov 29, 11:35 am, gk [EMAIL PROTECTED] wrote: Hi there I'm trying to work out how to get all the access control objects an access request object can access - for example all the blog posts a user can edit. Can anybody point me in the right direction on how to do this? Thanks very much. -- Best Regards Tóth Imre --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com 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 -~--~~~~--~~--~--~---
Re: Getting all the acos a aro can access?
On Tue, Dec 2, 2008 at 3:00 AM, Tóth Imre [EMAIL PROTECTED] wrote: I did it in a brue force way:), so i am intersted in a smooth solution too.:) 2008/12/1 dr. Hannibal Lecter [EMAIL PROTECTED] I'd like to know this too.. I didn't get the time to look into it in detail, but when I do and if I manage to find a solution I'll post it here. On Nov 29, 11:35 am, gk [EMAIL PROTECTED] wrote: Hi there I'm trying to work out how to get all the access control objects an access request object can access - for example all the blog posts a user can edit. Can anybody point me in the right direction on how to do this? Thanks very much. I used this myself, I don't think it's perfect, but suits my needs for now: $this-Aco = ClassRegistry::init('Aco'); $this-Aco-bindModel(array( 'hasOne' = array( 'ArosAco', 'FilterAro' = array( 'className' = 'Aro', 'foreignKey' = false, 'conditions' = array( 'FilterAro.id = ArosAco.aro_id', ) ) ) )); $selected = $this-Aco-find('all', array( 'recursive' = 0, 'fields' = array('Aco.id','Aco.alias'), 'conditions' = array( 'FilterAro.model' = $this-model, 'FilterAro.foreign_key' = $this-id ) )); $this-acos = array(); foreach ($selected as $aco) $this-acos[ $aco['Aco']['id'] ] = $aco['Aco']['alias']; -- Fedora 9 : sulphur is good for the skin ( www.pembo13.com ) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com 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 -~--~~~~--~~--~--~---
Re: Getting all the acos a aro can access?
I'd like to know this too.. I didn't get the time to look into it in detail, but when I do and if I manage to find a solution I'll post it here. On Nov 29, 11:35 am, gk [EMAIL PROTECTED] wrote: Hi there I'm trying to work out how to get all the access control objects an access request object can access - for example all the blog posts a user can edit. Can anybody point me in the right direction on how to do this? Thanks very much. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com 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 -~--~~~~--~~--~--~---
Getting all the acos a aro can access?
Hi there I'm trying to work out how to get all the access control objects an access request object can access - for example all the blog posts a user can edit. Can anybody point me in the right direction on how to do this? Thanks very much. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com 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 -~--~~~~--~~--~--~---
ACO/ARO in index functions
hi, is there is an easy way to filter object data in the controller for index pages before its sent to the view, based on an aro, without quering the aro/aco tables directly? cheers/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com 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 -~--~~~~--~~--~--~---
Re: Changing views depending on ARO
Silly me, it should have been a change in app_controller function beforeFilter() { $this-Auth-autoRedirect = false; instead of changing auth.php On Oct 16, 1:29 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: oh and I forgot, also added this in the user model function admin(){ if ($this-id) { $node = $this-node(); $type = $node['1']['Aro']['alias']; if($type=='Admin'){ return true; } } return false; } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com 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 -~--~~~~--~~--~--~---
Re: Changing views depending on ARO
I couldn't initially get it to work But then I cleared out the redirect session to stop it from confusing me (as it would automatically redirect to the previously redirected page first). To do that I put this in my users_controller : login function $this-Session-del('Auth.redirect'); I then changed the cake/libs/controller/components/auth.php to have var $autoRedirect = false; This is working now, but I have to find a way to turn off $autoredirect without changing auth.php itself. So thanks for the code - it helped heaps! On Oct 16, 1:29 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: oh and I forgot, also added this in the user model function admin(){ if ($this-id) { $node = $this-node(); $type = $node['1']['Aro']['alias']; if($type=='Admin'){ return true; } } return false; } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com 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 -~--~~~~--~~--~--~---
Acl: way to get Acos related to a given Aro?
Hi, I'm trying to find a way to guess all Acs for a given Aro in Acl. I tried this approach (in a controller, with Acl component) // get node and all parents $aro = new Aro(); $node = $aro-node(array('model' = 'Group', 'id' = 7); // extract id's $ids = Set::extract($node, '{n}.Aro.id'); $conditions = array('id' = $ids); // Find all Aros with that id, this will bring associated Aco $data = $this-Acl-Aro-find('all', $conditions); // Extract Aco from the array (Privilege is the model for the Acos I want to retrieve) $prueba = Set::extract($data, '/Aco[model=Privilege]'); It seems a bit inefficient. I would like to hear some suggestions. -- Fran Iglesias [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com 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 -~--~~~~--~~--~--~---
Changing views depending on ARO
Hey all I've just finished implementing cake's authcomponent + acl, Im trying to do something I cant quite figure out now. There are 2 types of users , admin and user (which are also groups), now as soon as a user logs in depending on its parent's aro I should redirect them to one layout or another. i.e. Admins should have a different view than normal users. I have no clue on how to do this on login... I'd appreciate help here --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com 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 -~--~~~~--~~--~--~---
Re: Changing views depending on ARO
I have this at the login action... it works, but its not pretty $this-User-id = $this-Auth-user('id'); $node = $this-User-node(); $type = $node['1']['Aro']['alias']; if($type=='Admin'){ $this- redirect(array('controller'='dashboard','action'='index')); }else{ $this-redirect($this-Auth-redirect()); } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com 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 -~--~~~~--~~--~--~---