Permission.php 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <?php
  2. /**
  3. *
  4. * PHP 5
  5. *
  6. * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
  7. * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
  8. *
  9. * Licensed under The MIT License
  10. * Redistributions of files must retain the above copyright notice.
  11. *
  12. * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
  13. * @link http://cakephp.org CakePHP(tm) Project
  14. * @package Cake.Model
  15. * @subpackage cake.cake.libs.model
  16. * @since CakePHP(tm) v 0.2.9
  17. * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
  18. */
  19. /**
  20. * Load Model and AppModel
  21. */
  22. App::uses('AppModel', 'Model');
  23. /**
  24. * Permissions linking AROs with ACOs
  25. *
  26. * @package Cake.Model
  27. * @subpackage cake.cake.libs.model
  28. */
  29. class Permission extends AppModel {
  30. /**
  31. * Model name
  32. *
  33. * @var string
  34. */
  35. public $name = 'Permission';
  36. /**
  37. * Explicitly disable in-memory query caching
  38. *
  39. * @var boolean
  40. */
  41. public $cacheQueries = false;
  42. /**
  43. * Override default table name
  44. *
  45. * @var string
  46. */
  47. public $useTable = 'aros_acos';
  48. /**
  49. * Permissions link AROs with ACOs
  50. *
  51. * @var array
  52. */
  53. public $belongsTo = array('Aro', 'Aco');
  54. /**
  55. * No behaviors for this model
  56. *
  57. * @var array
  58. */
  59. public $actsAs = null;
  60. /**
  61. * Constructor, used to tell this model to use the
  62. * database configured for ACL
  63. */
  64. public function __construct() {
  65. $config = Configure::read('Acl.database');
  66. if (!empty($config)) {
  67. $this->useDbConfig = $config;
  68. }
  69. parent::__construct();
  70. }
  71. }