During this time I researched and analyzed the codes of the tutorials to
fully understand the use of ACL + Auth with different permissions to groups,
a topic with some complexity to my liking yet. I decided to put a couple of
tips for those starting like me and have also some doubts, I hope they serve
for the truth to me took quite able to understand and even I have some
doubts about this. If possible if someone can pass answer the 3 questions
that I put down I could use.
If I'm wrong, feel free to correct me.

$actAs=array('Acl'=>'
requester')
* For models associated with the ACL tables
* This requires the use of the function parentNode () in the model
* This indicates that each time you create a record within the model that
this work will create a record in the table rings. If two models were
related, then take into account whether a record is created in either the
creation of a ring. And in the 2 models should be associated with this
variable by calling Acl

function parentNode()
* Used to be an association between parent model (hasMany) and child
(belongsTo)
* Used to assign permissions to users and groups.
* Must return null, or the value node ACO / ARO
* Also remember to use the $ this-> data, which is receiving value

function bindNode()
* If you use to assign permissions to groups only
* It uses the User model
* You must be assigned as a variable parameter which is equivalent to $
this-> data as it receives data.
* The parameter assigned, you can call by:
  $param[$this->alias] o $param['name_model']['associated_field']
  name_model, ej. ['User'] (remember uppercase )
  associated_field, ex. ['group_id'], which has indicated in the Db

node()
*Gets the ACL node of the model used and returns
*It you must set the id of the model, then you can use node ()

$this->alias
*It is used in the model
*Represents the model used
*Do not use if you are representing another model
*You can also use ['name_model']

parent::beforeFilter()
*It is used in the controller
*This indicates the relationship of father and son beforeFilter () in
app_controller

$this->Acl->check( $aro, $aco, $action = '*');
*The third parameter is optional and can be changed to permit default value
is *
*Return value boolean (TRUE/FALSE)

$this->Auth->User()
*Verify that the user has created a session
*To collect user information
 Ex. $session->read('Auth.User.field');
    field can be changed to show a specific field
    Yes. Field is not added, to compile all possible information

field()
*It is used in the controller
*Used as a find, to get data from the database of a specific field
For more information:
http://book.cakephp.org/es/view/1245/Definiendo-Permisos-ACL-en-la-base-de-datos#!/es/view/1265/Atributos-de-AuthComponent
http://book.cakephp.org/es/view/1249/Verificando-Permisos-El-Componente-ACL
http://api13.cakephp.org/class/acl-base
http://api13.cakephp.org/class/acl-behavior
http://api13.cakephp.org/class/acl-node
http://api13.cakephp.org/class/acl-component
http://book.cakephp.org/view/647/An-Automated-tool-for-creating-ACOs

Questions:
*Differences between using parentNode () y bindNode ()
*Unlike content parentNode () parent-child model
*Using the checkhelper () y AccessHelper

-- 
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
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to