diff --git a/lib/Cake/Model/Aco.php b/lib/Cake/Model/Aco.php new file mode 100644 index 000000000..f8a92bcf4 --- /dev/null +++ b/lib/Cake/Model/Aco.php @@ -0,0 +1,48 @@ + array('with' => 'Permission')); +} \ No newline at end of file diff --git a/lib/Cake/Model/AcoAction.php b/lib/Cake/Model/AcoAction.php new file mode 100644 index 000000000..fe9734228 --- /dev/null +++ b/lib/Cake/Model/AcoAction.php @@ -0,0 +1,48 @@ + array('with' => 'Permission')); +} \ No newline at end of file diff --git a/lib/Cake/Model/DbAcl.php b/lib/Cake/Model/DbAcl.php index 2a0f20c79..9936a6e99 100644 --- a/lib/Cake/Model/DbAcl.php +++ b/lib/Cake/Model/DbAcl.php @@ -1,8 +1,5 @@ array('with' => 'Permission')); -} - -/** - * Action for Access Control Object - * - * @package cake - * @subpackage cake.cake.libs.model - */ -class AcoAction extends AppModel { - -/** - * Model name - * - * @var string - * @access public - */ - public $name = 'AcoAction'; - -/** - * ACO Actions belong to ACOs - * - * @var array - * @access public - */ - public $belongsTo = array('Aco'); -} - -/** - * Access Request Object - * - * @package cake - * @subpackage cake.cake.libs.model - */ -class Aro extends AclNode { - -/** - * Model name - * - * @var string - * @access public - */ - public $name = 'Aro'; - -/** - * AROs are linked to ACOs by means of Permission - * - * @var array - * @access public - */ - public $hasAndBelongsToMany = array('Aco' => array('with' => 'Permission')); -} - -/** - * Permissions linking AROs with ACOs - * - * @package cake - * @subpackage cake.cake.libs.model - */ -class Permission extends AppModel { - -/** - * Model name - * - * @var string - * @access public - */ - public $name = 'Permission'; - -/** - * Explicitly disable in-memory query caching - * - * @var boolean - * @access public - */ - public $cacheQueries = false; - -/** - * Override default table name - * - * @var string - * @access public - */ - public $useTable = 'aros_acos'; - -/** - * Permissions link AROs with ACOs - * - * @var array - * @access public - */ - public $belongsTo = array('Aro', 'Aco'); - -/** - * No behaviors for this model - * - * @var array - * @access public - */ - public $actsAs = null; - -/** - * Constructor, used to tell this model to use the - * database configured for ACL - */ - function __construct() { - $config = Configure::read('Acl.database'); - if (!empty($config)) { - $this->useDbConfig = $config; - } - parent::__construct(); - } -} +} \ No newline at end of file diff --git a/lib/Cake/Model/Permission.php b/lib/Cake/Model/Permission.php new file mode 100644 index 000000000..5ca0f0682 --- /dev/null +++ b/lib/Cake/Model/Permission.php @@ -0,0 +1,84 @@ +useDbConfig = $config; + } + parent::__construct(); + } +} \ No newline at end of file