Comments: authorize

By campem on 24/9/08

1 - The different values authorize can take.

It would be nice if the different values that the Auth->authorize variable can take were listed and detailed. Only controller and model are explained on this page. When looking at the Auth Tutorial you get that you can set it to "actions" too without explanations as to what that does.

From the source code of auth.php you get the following:

00063 /**

00064 * The name of the component to use for Authorization or set this to

00065 * 'controller' will validate against Controller::isAuthorized()

00066 * 'actions' will validate Controller::action against an AclComponent::check()

00067 * 'crud' will validate mapActions against an AclComponent::check()

00068 * array('model'=> 'name'); will validate mapActions against model $name::isAuthorize(user, controller, mapAction)

00069 * 'object' will validate Controller::action against object::isAuthorized(user, controller, action)

00070 *

00071 * @var mixed

00072 * @access public

00073 */

00074 var $authorize = false;

By gordianknot on 23/10/08

2 - authorize action tutorial

http://stackoverflow.com/questions/54230/cakephp-acl-database-setup-aro-aco-structure