Permission.php 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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
  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
  27. * @subpackage cake.cake.libs.model
  28. */
  29. class Permission extends AppModel {
  30. /**
  31. * Model name
  32. *
  33. * @var string
  34. * @access public
  35. */
  36. public $name = 'Permission';
  37. /**
  38. * Explicitly disable in-memory query caching
  39. *
  40. * @var boolean
  41. * @access public
  42. */
  43. public $cacheQueries = false;
  44. /**
  45. * Override default table name
  46. *
  47. * @var string
  48. * @access public
  49. */
  50. public $useTable = 'aros_acos';
  51. /**
  52. * Permissions link AROs with ACOs
  53. *
  54. * @var array
  55. * @access public
  56. */
  57. public $belongsTo = array('Aro', 'Aco');
  58. /**
  59. * No behaviors for this model
  60. *
  61. * @var array
  62. * @access public
  63. */
  64. public $actsAs = null;
  65. /**
  66. * Constructor, used to tell this model to use the
  67. * database configured for ACL
  68. */
  69. public function __construct() {
  70. $config = Configure::read('Acl.database');
  71. if (!empty($config)) {
  72. $this->useDbConfig = $config;
  73. }
  74. parent::__construct();
  75. }
  76. }