2005-11-05 04:08:14 +00:00
|
|
|
<?php
|
|
|
|
/* SVN FILE: $Id$ */
|
|
|
|
/**
|
2006-01-12 02:10:47 +00:00
|
|
|
* This is core configuration file.
|
|
|
|
*
|
2005-11-05 04:08:14 +00:00
|
|
|
* Use it to configure core behaviour ofCake.
|
|
|
|
*
|
|
|
|
* PHP versions 4 and 5
|
|
|
|
*
|
2007-02-02 10:39:45 +00:00
|
|
|
* CakePHP(tm) : Rapid Development Framework <http://www.cakephp.org/>
|
2008-01-01 22:18:17 +00:00
|
|
|
* Copyright 2005-2008, Cake Software Foundation, Inc.
|
2006-05-26 05:29:17 +00:00
|
|
|
* 1785 E. Sahara Avenue, Suite 490-204
|
|
|
|
* Las Vegas, Nevada 89104
|
2006-01-12 02:10:47 +00:00
|
|
|
*
|
2005-12-23 21:57:26 +00:00
|
|
|
* Licensed under The MIT License
|
|
|
|
* Redistributions of files must retain the above copyright notice.
|
2005-11-05 04:08:14 +00:00
|
|
|
*
|
2006-01-12 02:10:47 +00:00
|
|
|
* @filesource
|
2008-01-01 22:18:17 +00:00
|
|
|
* @copyright Copyright 2005-2008, Cake Software Foundation, Inc.
|
2007-02-02 10:39:45 +00:00
|
|
|
* @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project
|
2006-05-26 05:29:17 +00:00
|
|
|
* @package cake
|
2007-05-01 01:49:51 +00:00
|
|
|
* @subpackage cake.cake.libs.model
|
2007-02-02 10:39:45 +00:00
|
|
|
* @since CakePHP(tm) v 0.2.9
|
2006-05-26 05:29:17 +00:00
|
|
|
* @version $Revision$
|
|
|
|
* @modifiedby $LastChangedBy$
|
|
|
|
* @lastmodified $Date$
|
|
|
|
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
|
2005-11-05 04:08:14 +00:00
|
|
|
*/
|
2007-05-01 01:49:51 +00:00
|
|
|
/**
|
|
|
|
* Set database config if not defined.
|
|
|
|
*/
|
|
|
|
/**
|
|
|
|
* Load Model and AppModel
|
|
|
|
*/
|
Closes #2119 Only define clone() in PHP4 when it hasn't been already defined.
Closes #2213, Support multiple plugin paths.
Closes #2234, filepaths to behavior classes should be cached in class.paths.php also
Closes #2345, ability to group components into subfolders
Closes #2645, Improvement to basic.php for class loading.
Fixes #3526, Cache::write, when using just the config name, it fails.
Fixes #3559, loading plugin model as assoc don't work.
Closes #3567 Controller Folders (Note this does not need routing to work, but controller names can not conflict with others in the same application so naming must still be unique)
Fixes #3579, email.php component: Parse error with php 4.
Adding new class and file importer.
Updated most of the core to use the importer.
Added ClassRegsitry::init() that will create and instance of an object and store it in the registry.
Deprecated most of the load functions in basics.php
Plugin model loading now forces using the dot notation, to use models within a plugin, all the model associations must be in the PluginName.Model syntax, if this is not used, the plugin will look for the models in the main app/models directory first, if not found then it will search the plugin directories recursively until it finds a model.
var $belongsTo = array('SomeModel'); will look for some_model.php in the app/models
var $belongsTo = array('MyPlugin.SomeModel'); will look for some_model.php in my_plugin/models
var $belongsTo = array('MyPlugin.MyPlugin', 'SomeModel'); will used my_plugin/models/my_plugin.php and app/models/some_model.php
The controllers of the plugin will still look for the default models inside the plugin if var $uses is not set:
var $uses = array('SomeModel'); will look for some_model.php in the app/models
var $uses = array('MyPlugin.SomeModel'); will look for some_model.php in my_plugin/models
var $uses = array('MyPlugin.MyPlugin', 'SomeModel'); will used my_plugin/models/my_plugin.php and app/models/some_model.php
All of the above will work between plugins and main app
These changes also allow placing model and controllers is sub directories
Removed old class.paths.php file generation
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6001 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-11-16 09:35:19 +00:00
|
|
|
App::import('Model', 'App');
|
2007-05-01 01:49:51 +00:00
|
|
|
/**
|
|
|
|
* Short description for file.
|
|
|
|
*
|
|
|
|
* Long description for file
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @package cake
|
|
|
|
* @subpackage cake.cake.libs.model
|
|
|
|
*/
|
|
|
|
class AclNode extends AppModel {
|
|
|
|
/**
|
|
|
|
* Explicitly disable in-memory query caching for ACL models
|
|
|
|
*
|
|
|
|
* @var boolean
|
2007-11-05 02:47:04 +00:00
|
|
|
* @access public
|
2007-05-01 01:49:51 +00:00
|
|
|
*/
|
|
|
|
var $cacheQueries = false;
|
|
|
|
/**
|
|
|
|
* ACL models use the Tree behavior
|
|
|
|
*
|
2007-11-05 02:47:04 +00:00
|
|
|
* @var array
|
|
|
|
* @access public
|
2007-05-01 01:49:51 +00:00
|
|
|
*/
|
|
|
|
var $actsAs = array('Tree' => 'nested');
|
2007-10-14 01:09:21 +00:00
|
|
|
/**
|
|
|
|
* Constructor
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
function __construct() {
|
|
|
|
$config = Configure::read('Acl.database');
|
|
|
|
if(isset($config)) {
|
|
|
|
$this->useDbConfig = $config;
|
|
|
|
}
|
|
|
|
parent::__construct();
|
|
|
|
}
|
2007-05-01 01:49:51 +00:00
|
|
|
/**
|
|
|
|
* Retrieves the Aro/Aco node for this model
|
|
|
|
*
|
2007-11-05 02:47:04 +00:00
|
|
|
* @param mixed $ref Array with 'model' and 'foreign_key', model object, or string value
|
|
|
|
* @return array Node found in database
|
|
|
|
* @access public
|
2007-05-01 01:49:51 +00:00
|
|
|
*/
|
|
|
|
function node($ref = null) {
|
|
|
|
$db =& ConnectionManager::getDataSource($this->useDbConfig);
|
2007-10-27 01:32:17 +00:00
|
|
|
$type = $this->alias;
|
2007-07-08 03:09:06 +00:00
|
|
|
$result = null;
|
2007-05-01 01:49:51 +00:00
|
|
|
|
|
|
|
if (!empty($this->useTable)) {
|
|
|
|
$table = $this->useTable;
|
|
|
|
} else {
|
|
|
|
$table = Inflector::pluralize(Inflector::underscore($type));
|
|
|
|
}
|
|
|
|
|
|
|
|
if (empty($ref)) {
|
|
|
|
return null;
|
|
|
|
} elseif (is_string($ref)) {
|
|
|
|
$path = explode('/', $ref);
|
2007-08-27 03:16:49 +00:00
|
|
|
$start = $path[0];
|
|
|
|
unset($path[0]);
|
2007-05-01 01:49:51 +00:00
|
|
|
|
2008-02-11 02:27:16 +00:00
|
|
|
$queryData = array(
|
|
|
|
'conditions' => array(
|
|
|
|
$db->name("{$type}.lft") . ' <= ' . $db->name("{$type}0.lft"),
|
|
|
|
$db->name("{$type}.rght") . ' >= ' . $db->name("{$type}0.rght")),
|
|
|
|
'fields' => array('id', 'parent_id', 'model', 'foreign_key', 'alias'),
|
|
|
|
'joins' => array(array(
|
2008-05-22 02:00:36 +00:00
|
|
|
'table' => $db->fullTableName($this),
|
2008-02-11 02:27:16 +00:00
|
|
|
'alias' => "{$type}0",
|
|
|
|
'type' => 'LEFT',
|
|
|
|
'conditions' => array("{$type}0.alias" => $start)
|
|
|
|
)),
|
|
|
|
'order' => $db->name("{$type}.lft") . ' DESC'
|
|
|
|
);
|
|
|
|
|
2007-05-01 01:49:51 +00:00
|
|
|
foreach ($path as $i => $alias) {
|
|
|
|
$j = $i - 1;
|
Fixes #2902, DB_ACL::allow allowing all when $actions is not an array.
Fixes #2988, AclComponent check() does not inherit permissions.
Fixes #3022, Inconsistent table alias quoting crashes Acl node lookup with PostgreSQL.
Fixes #3129, Console ACL Shell ACO View Broken
Fixes #3176, Problems with ACL support on Microsoft SQL Server.
Closes #3311 as invalid, DboSourceTest::testArrayConditionsParsing tests added
Fixes #3312, DB_ACL::check() fail returning right permission
Fixes #3344, Model->field adds incorrect condition under certain circumstances.
Fixes #3400, Cookie Component: When reading a non-existing key it throws a notice.
Fixes #3407, Since [5768] CookieComponent throws warning when used in beforeFilter().
Closes #3401, Added form test to ensure $Form->fields array is what the security component requires.
Updated AclComponentTest
Merged changes in app/ to cake/console/libs/templates/skel
Fixed generated link to Run More Test after running Group > All tests
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5776 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-10-17 12:51:17 +00:00
|
|
|
|
2008-02-11 02:27:16 +00:00
|
|
|
$queryData['joins'][] = array(
|
2008-05-22 02:00:36 +00:00
|
|
|
'table' => $db->fullTableName($this),
|
2008-02-11 02:27:16 +00:00
|
|
|
'alias' => "{$type}{$i}",
|
|
|
|
'type' => 'LEFT',
|
|
|
|
'conditions' => array(
|
|
|
|
$db->name("{$type}{$i}.lft") . ' > ' . $db->name("{$type}{$j}.lft"),
|
|
|
|
$db->name("{$type}{$i}.rght") . ' < ' . $db->name("{$type}{$j}.rght"),
|
|
|
|
$db->name("{$type}{$i}.alias") . ' = ' . $db->value($alias)
|
|
|
|
)
|
|
|
|
);
|
Fixes #2902, DB_ACL::allow allowing all when $actions is not an array.
Fixes #2988, AclComponent check() does not inherit permissions.
Fixes #3022, Inconsistent table alias quoting crashes Acl node lookup with PostgreSQL.
Fixes #3129, Console ACL Shell ACO View Broken
Fixes #3176, Problems with ACL support on Microsoft SQL Server.
Closes #3311 as invalid, DboSourceTest::testArrayConditionsParsing tests added
Fixes #3312, DB_ACL::check() fail returning right permission
Fixes #3344, Model->field adds incorrect condition under certain circumstances.
Fixes #3400, Cookie Component: When reading a non-existing key it throws a notice.
Fixes #3407, Since [5768] CookieComponent throws warning when used in beforeFilter().
Closes #3401, Added form test to ensure $Form->fields array is what the security component requires.
Updated AclComponentTest
Merged changes in app/ to cake/console/libs/templates/skel
Fixed generated link to Run More Test after running Group > All tests
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5776 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-10-17 12:51:17 +00:00
|
|
|
|
|
|
|
$queryData['conditions'] = array('or' => array(
|
2008-02-11 02:27:16 +00:00
|
|
|
$db->name("{$type}.lft") . ' <= ' . $db->name("{$type}0.lft") . ' AND ' . $db->name("{$type}.rght") . ' >= ' . $db->name("{$type}0.rght"),
|
|
|
|
$db->name("{$type}.lft") . ' <= ' . $db->name("{$type}{$i}.lft") . ' AND ' . $db->name("{$type}.rght") . ' >= ' . $db->name("{$type}{$i}.rght"))
|
|
|
|
);
|
2007-05-01 01:49:51 +00:00
|
|
|
}
|
Fixes #2902, DB_ACL::allow allowing all when $actions is not an array.
Fixes #2988, AclComponent check() does not inherit permissions.
Fixes #3022, Inconsistent table alias quoting crashes Acl node lookup with PostgreSQL.
Fixes #3129, Console ACL Shell ACO View Broken
Fixes #3176, Problems with ACL support on Microsoft SQL Server.
Closes #3311 as invalid, DboSourceTest::testArrayConditionsParsing tests added
Fixes #3312, DB_ACL::check() fail returning right permission
Fixes #3344, Model->field adds incorrect condition under certain circumstances.
Fixes #3400, Cookie Component: When reading a non-existing key it throws a notice.
Fixes #3407, Since [5768] CookieComponent throws warning when used in beforeFilter().
Closes #3401, Added form test to ensure $Form->fields array is what the security component requires.
Updated AclComponentTest
Merged changes in app/ to cake/console/libs/templates/skel
Fixed generated link to Run More Test after running Group > All tests
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5776 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-10-17 12:51:17 +00:00
|
|
|
$result = $db->read($this, $queryData, -1);
|
2008-04-11 04:59:52 +00:00
|
|
|
$path = array_values($path);
|
|
|
|
|
|
|
|
if (
|
|
|
|
!isset($result[0][$type]) ||
|
|
|
|
(!empty($path) && $result[0][$type]['alias'] != $path[count($path) - 1]) ||
|
|
|
|
(empty($path) && $result[0][$type]['alias'] != $start)
|
|
|
|
) {
|
|
|
|
return false;
|
|
|
|
}
|
2007-05-01 01:49:51 +00:00
|
|
|
} elseif (is_object($ref) && is_a($ref, 'Model')) {
|
2007-10-27 01:32:17 +00:00
|
|
|
$ref = array('model' => $ref->alias, 'foreign_key' => $ref->id);
|
2007-05-01 01:49:51 +00:00
|
|
|
} elseif (is_array($ref) && !(isset($ref['model']) && isset($ref['foreign_key']))) {
|
|
|
|
$name = key($ref);
|
2007-11-24 16:10:03 +00:00
|
|
|
|
2008-02-11 02:27:16 +00:00
|
|
|
if (PHP5) {
|
2007-11-24 16:10:03 +00:00
|
|
|
$model = ClassRegistry::init(array('class' => $name, 'alias' => $name));
|
2007-05-01 01:49:51 +00:00
|
|
|
} else {
|
2007-11-24 16:10:03 +00:00
|
|
|
$model =& ClassRegistry::init(array('class' => $name, 'alias' => $name));
|
2007-05-01 01:49:51 +00:00
|
|
|
}
|
2007-11-24 16:10:03 +00:00
|
|
|
|
|
|
|
if (empty($model)) {
|
|
|
|
trigger_error("Model class '$name' not found in AclNode::node() when trying to bind {$this->alias} object", E_USER_WARNING);
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
2007-05-01 01:49:51 +00:00
|
|
|
$tmpRef = null;
|
|
|
|
if (method_exists($model, 'bindNode')) {
|
|
|
|
$tmpRef = $model->bindNode($ref);
|
|
|
|
}
|
|
|
|
if (empty($tmpRef)) {
|
|
|
|
$ref = array('model' => $name, 'foreign_key' => $ref[$name][$model->primaryKey]);
|
|
|
|
} else {
|
|
|
|
if (is_string($tmpRef)) {
|
|
|
|
return $this->node($tmpRef);
|
|
|
|
}
|
|
|
|
$ref = $tmpRef;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (is_array($ref)) {
|
|
|
|
foreach ($ref as $key => $val) {
|
|
|
|
if (strpos($key, $type) !== 0) {
|
|
|
|
unset($ref[$key]);
|
|
|
|
$ref["{$type}0.{$key}"] = $val;
|
|
|
|
}
|
|
|
|
}
|
2008-02-11 02:27:16 +00:00
|
|
|
$queryData = array(
|
|
|
|
'conditions' => $ref,
|
|
|
|
'fields' => array('id', 'parent_id', 'model', 'foreign_key', 'alias'),
|
|
|
|
'joins' => array(array(
|
2008-05-22 02:00:36 +00:00
|
|
|
'table' => $db->fullTableName($table),
|
2008-02-11 02:27:16 +00:00
|
|
|
'alias' => "{$type}0",
|
|
|
|
'type' => 'LEFT',
|
|
|
|
'conditions' => array(
|
|
|
|
$db->name("{$type}.lft") . ' <= ' . $db->name("{$type}0.lft"),
|
|
|
|
$db->name("{$type}.rght") . ' >= ' . $db->name("{$type}0.rght")
|
|
|
|
)
|
|
|
|
)),
|
|
|
|
'order' => $db->name("{$type}.lft") . ' DESC'
|
|
|
|
);
|
Fixes #2902, DB_ACL::allow allowing all when $actions is not an array.
Fixes #2988, AclComponent check() does not inherit permissions.
Fixes #3022, Inconsistent table alias quoting crashes Acl node lookup with PostgreSQL.
Fixes #3129, Console ACL Shell ACO View Broken
Fixes #3176, Problems with ACL support on Microsoft SQL Server.
Closes #3311 as invalid, DboSourceTest::testArrayConditionsParsing tests added
Fixes #3312, DB_ACL::check() fail returning right permission
Fixes #3344, Model->field adds incorrect condition under certain circumstances.
Fixes #3400, Cookie Component: When reading a non-existing key it throws a notice.
Fixes #3407, Since [5768] CookieComponent throws warning when used in beforeFilter().
Closes #3401, Added form test to ensure $Form->fields array is what the security component requires.
Updated AclComponentTest
Merged changes in app/ to cake/console/libs/templates/skel
Fixed generated link to Run More Test after running Group > All tests
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5776 3807eeeb-6ff5-0310-8944-8be069107fe0
2007-10-17 12:51:17 +00:00
|
|
|
$result = $db->read($this, $queryData, -1);
|
2007-05-01 01:49:51 +00:00
|
|
|
|
|
|
|
if (!$result) {
|
|
|
|
trigger_error("AclNode::node() - Couldn't find {$type} node identified by \"" . print_r($ref, true) . "\"", E_USER_WARNING);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return $result;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/**
|
2007-11-05 02:47:04 +00:00
|
|
|
* Access Control Object
|
2007-05-01 01:49:51 +00:00
|
|
|
*
|
2007-11-05 02:47:04 +00:00
|
|
|
* @package cake
|
|
|
|
* @subpackage cake.cake.libs.model
|
2007-05-01 01:49:51 +00:00
|
|
|
*/
|
|
|
|
class Aco extends AclNode {
|
|
|
|
/**
|
|
|
|
* Model name
|
|
|
|
*
|
|
|
|
* @var string
|
2007-11-05 02:47:04 +00:00
|
|
|
* @access public
|
2007-05-01 01:49:51 +00:00
|
|
|
*/
|
|
|
|
var $name = 'Aco';
|
|
|
|
/**
|
|
|
|
* Binds to ARO nodes through permissions settings
|
|
|
|
*
|
|
|
|
* @var array
|
2007-11-05 02:47:04 +00:00
|
|
|
* @access public
|
2007-05-01 01:49:51 +00:00
|
|
|
*/
|
|
|
|
var $hasAndBelongsToMany = array('Aro' => array('with' => 'Permission'));
|
|
|
|
}
|
|
|
|
/**
|
2007-11-05 02:47:04 +00:00
|
|
|
* Action for Access Control Object
|
2007-05-01 01:49:51 +00:00
|
|
|
*
|
|
|
|
* @package cake
|
|
|
|
* @subpackage cake.cake.libs.model
|
|
|
|
*/
|
|
|
|
class AcoAction extends AppModel {
|
|
|
|
/**
|
2007-11-05 02:47:04 +00:00
|
|
|
* Model name
|
2007-05-01 01:49:51 +00:00
|
|
|
*
|
2007-11-05 02:47:04 +00:00
|
|
|
* @var string
|
|
|
|
* @access public
|
2007-05-01 01:49:51 +00:00
|
|
|
*/
|
2007-11-05 02:47:04 +00:00
|
|
|
var $name = 'AcoAction';
|
2007-05-01 01:49:51 +00:00
|
|
|
/**
|
2007-11-05 02:47:04 +00:00
|
|
|
* ACO Actions belong to ACOs
|
2007-05-01 01:49:51 +00:00
|
|
|
*
|
2007-11-05 02:47:04 +00:00
|
|
|
* @var array
|
|
|
|
* @access public
|
|
|
|
*/
|
|
|
|
var $belongsTo = array('Aco');
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* Access Request Object
|
2007-05-01 01:49:51 +00:00
|
|
|
*
|
2007-11-05 02:47:04 +00:00
|
|
|
* @package cake
|
|
|
|
* @subpackage cake.cake.libs.model
|
2007-05-01 01:49:51 +00:00
|
|
|
*/
|
|
|
|
class Aro extends AclNode {
|
|
|
|
/**
|
2007-11-05 02:47:04 +00:00
|
|
|
* Model name
|
2007-05-01 01:49:51 +00:00
|
|
|
*
|
2007-11-05 02:47:04 +00:00
|
|
|
* @var string
|
|
|
|
* @access public
|
2007-05-01 01:49:51 +00:00
|
|
|
*/
|
|
|
|
var $name = 'Aro';
|
|
|
|
/**
|
2007-11-05 02:47:04 +00:00
|
|
|
* AROs are linked to ACOs by means of Permission
|
2007-05-01 01:49:51 +00:00
|
|
|
*
|
2007-11-05 02:47:04 +00:00
|
|
|
* @var array
|
|
|
|
* @access public
|
2007-05-01 01:49:51 +00:00
|
|
|
*/
|
|
|
|
var $hasAndBelongsToMany = array('Aco' => array('with' => 'Permission'));
|
|
|
|
}
|
|
|
|
/**
|
2007-11-05 02:47:04 +00:00
|
|
|
* Permissions linking AROs with ACOs
|
2007-05-01 01:49:51 +00:00
|
|
|
*
|
2007-11-05 02:47:04 +00:00
|
|
|
* @package cake
|
|
|
|
* @subpackage cake.cake.libs.model
|
2007-05-01 01:49:51 +00:00
|
|
|
*/
|
|
|
|
class Permission extends AppModel {
|
|
|
|
/**
|
2007-11-05 02:47:04 +00:00
|
|
|
* Model name
|
2007-05-01 01:49:51 +00:00
|
|
|
*
|
2007-11-05 02:47:04 +00:00
|
|
|
* @var string
|
|
|
|
* @access public
|
2007-05-01 01:49:51 +00:00
|
|
|
*/
|
2007-11-05 02:47:04 +00:00
|
|
|
var $name = 'Permission';
|
2007-05-01 01:49:51 +00:00
|
|
|
/**
|
2007-11-05 02:47:04 +00:00
|
|
|
* Explicitly disable in-memory query caching
|
2007-05-01 01:49:51 +00:00
|
|
|
*
|
2007-11-05 02:47:04 +00:00
|
|
|
* @var boolean
|
|
|
|
* @access public
|
2007-05-01 01:49:51 +00:00
|
|
|
*/
|
2007-11-05 02:47:04 +00:00
|
|
|
var $cacheQueries = false;
|
2007-05-01 01:49:51 +00:00
|
|
|
/**
|
2007-11-05 02:47:04 +00:00
|
|
|
* Override default table name
|
2007-05-01 01:49:51 +00:00
|
|
|
*
|
2007-11-05 02:47:04 +00:00
|
|
|
* @var string
|
|
|
|
* @access public
|
2007-05-01 01:49:51 +00:00
|
|
|
*/
|
|
|
|
var $useTable = 'aros_acos';
|
|
|
|
/**
|
2007-11-05 02:47:04 +00:00
|
|
|
* Permissions link AROs with ACOs
|
2007-05-01 01:49:51 +00:00
|
|
|
*
|
2007-11-05 02:47:04 +00:00
|
|
|
* @var array
|
|
|
|
* @access public
|
2007-05-01 01:49:51 +00:00
|
|
|
*/
|
2007-11-05 02:47:04 +00:00
|
|
|
var $belongsTo = array('Aro', 'Aco');
|
2007-05-01 01:49:51 +00:00
|
|
|
/**
|
2007-11-05 02:47:04 +00:00
|
|
|
* No behaviors for this model
|
2007-05-01 01:49:51 +00:00
|
|
|
*
|
2007-11-05 02:47:04 +00:00
|
|
|
* @var array
|
|
|
|
* @access public
|
2007-05-01 01:49:51 +00:00
|
|
|
*/
|
|
|
|
var $actsAs = null;
|
2007-10-14 01:09:21 +00:00
|
|
|
/**
|
2007-11-05 02:47:04 +00:00
|
|
|
* Constructor, used to tell this model to use the
|
|
|
|
* database configured for ACL
|
2007-10-14 01:09:21 +00:00
|
|
|
*/
|
|
|
|
function __construct() {
|
|
|
|
$config = Configure::read('Acl.database');
|
2007-11-05 02:47:04 +00:00
|
|
|
if (!empty($config)) {
|
2007-10-14 01:09:21 +00:00
|
|
|
$this->useDbConfig = $config;
|
|
|
|
}
|
|
|
|
parent::__construct();
|
|
|
|
}
|
2007-05-01 01:49:51 +00:00
|
|
|
}
|
2007-10-28 04:18:18 +00:00
|
|
|
?>
|