Base for a static organization website

db_acl.php 3.0KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <?php
  2. /**
  3. * This is Acl Schema file
  4. *
  5. * Use it to configure database for ACL
  6. *
  7. * @link http://cakephp.org CakePHP(tm) Project
  8. * @package app.Config.Schema
  9. * @since CakePHP(tm) v 0.2.9
  10. */
  11. /**
  12. * Using the Schema command line utility
  13. * cake schema run create DbAcl
  14. */
  15. class DbAclSchema extends CakeSchema {
  16. /**
  17. * Before event.
  18. *
  19. * @param array $event The event data.
  20. * @return bool success
  21. */
  22. public function before($event = array()) {
  23. return true;
  24. }
  25. /**
  26. * After event.
  27. *
  28. * @param array $event The event data.
  29. * @return void
  30. */
  31. public function after($event = array()) {
  32. }
  33. /**
  34. * ACO - Access Control Object - Something that is wanted
  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. * ARO - Access Request Object - Something that wants something
  48. */
  49. public $aros = array(
  50. 'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'length' => 10, 'key' => 'primary'),
  51. 'parent_id' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10),
  52. 'model' => array('type' => 'string', 'null' => true),
  53. 'foreign_key' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10),
  54. 'alias' => array('type' => 'string', 'null' => true),
  55. 'lft' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10),
  56. 'rght' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10),
  57. 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1))
  58. );
  59. /**
  60. * Used by the Cake::Model:Permission class.
  61. * Checks if the given $aro has access to action $action in $aco.
  62. */
  63. public $aros_acos = array(
  64. 'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'length' => 10, 'key' => 'primary'),
  65. 'aro_id' => array('type' => 'integer', 'null' => false, 'length' => 10, 'key' => 'index'),
  66. 'aco_id' => array('type' => 'integer', 'null' => false, 'length' => 10),
  67. '_create' => array('type' => 'string', 'null' => false, 'default' => '0', 'length' => 2),
  68. '_read' => array('type' => 'string', 'null' => false, 'default' => '0', 'length' => 2),
  69. '_update' => array('type' => 'string', 'null' => false, 'default' => '0', 'length' => 2),
  70. '_delete' => array('type' => 'string', 'null' => false, 'default' => '0', 'length' => 2),
  71. 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1), 'ARO_ACO_KEY' => array('column' => array('aro_id', 'aco_id'), 'unique' => 1))
  72. );
  73. }