| 13532 |
anikendra |
1 |
<?php
|
|
|
2 |
/**
|
|
|
3 |
* This is Acl Schema file
|
|
|
4 |
*
|
|
|
5 |
* Use it to configure database for ACL
|
|
|
6 |
*
|
|
|
7 |
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
|
|
8 |
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
|
|
9 |
*
|
|
|
10 |
* Licensed under The MIT License
|
|
|
11 |
* For full copyright and license information, please see the LICENSE.txt
|
|
|
12 |
* Redistributions of files must retain the above copyright notice.
|
|
|
13 |
*
|
|
|
14 |
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
|
|
15 |
* @link http://cakephp.org CakePHP(tm) Project
|
|
|
16 |
* @package app.Config.Schema
|
|
|
17 |
* @since CakePHP(tm) v 0.2.9
|
|
|
18 |
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
|
|
19 |
*/
|
|
|
20 |
|
|
|
21 |
/*
|
|
|
22 |
*
|
|
|
23 |
* Using the Schema command line utility
|
|
|
24 |
* cake schema run create DbAcl
|
|
|
25 |
*
|
|
|
26 |
*/
|
|
|
27 |
class DbAclSchema extends CakeSchema {
|
|
|
28 |
|
|
|
29 |
public function before($event = array()) {
|
|
|
30 |
return true;
|
|
|
31 |
}
|
|
|
32 |
|
|
|
33 |
public function after($event = array()) {
|
|
|
34 |
}
|
|
|
35 |
|
|
|
36 |
public $acos = array(
|
|
|
37 |
'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'length' => 10, 'key' => 'primary'),
|
|
|
38 |
'parent_id' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10),
|
|
|
39 |
'model' => array('type' => 'string', 'null' => true),
|
|
|
40 |
'foreign_key' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10),
|
|
|
41 |
'alias' => array('type' => 'string', 'null' => true),
|
|
|
42 |
'lft' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10),
|
|
|
43 |
'rght' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10),
|
|
|
44 |
'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1))
|
|
|
45 |
);
|
|
|
46 |
|
|
|
47 |
public $aros = array(
|
|
|
48 |
'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'length' => 10, 'key' => 'primary'),
|
|
|
49 |
'parent_id' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10),
|
|
|
50 |
'model' => array('type' => 'string', 'null' => true),
|
|
|
51 |
'foreign_key' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10),
|
|
|
52 |
'alias' => array('type' => 'string', 'null' => true),
|
|
|
53 |
'lft' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10),
|
|
|
54 |
'rght' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10),
|
|
|
55 |
'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1))
|
|
|
56 |
);
|
|
|
57 |
|
|
|
58 |
public $aros_acos = array(
|
|
|
59 |
'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'length' => 10, 'key' => 'primary'),
|
|
|
60 |
'aro_id' => array('type' => 'integer', 'null' => false, 'length' => 10, 'key' => 'index'),
|
|
|
61 |
'aco_id' => array('type' => 'integer', 'null' => false, 'length' => 10),
|
|
|
62 |
'_create' => array('type' => 'string', 'null' => false, 'default' => '0', 'length' => 2),
|
|
|
63 |
'_read' => array('type' => 'string', 'null' => false, 'default' => '0', 'length' => 2),
|
|
|
64 |
'_update' => array('type' => 'string', 'null' => false, 'default' => '0', 'length' => 2),
|
|
|
65 |
'_delete' => array('type' => 'string', 'null' => false, 'default' => '0', 'length' => 2),
|
|
|
66 |
'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1), 'ARO_ACO_KEY' => array('column' => array('aro_id', 'aco_id'), 'unique' => 1))
|
|
|
67 |
);
|
|
|
68 |
|
|
|
69 |
}
|