Permission.php 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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. * @since CakePHP(tm) v 0.2.9
  16. * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
  17. */
  18. /**
  19. * Load Model and AppModel
  20. */
  21. App::uses('AppModel', 'Model');
  22. /**
  23. * Permissions linking AROs with ACOs
  24. *
  25. * @package Cake.Model
  26. */
  27. class Permission extends AppModel {
  28. /**
  29. * Model name
  30. *
  31. * @var string
  32. */
  33. public $name = 'Permission';
  34. /**
  35. * Explicitly disable in-memory query caching
  36. *
  37. * @var boolean
  38. */
  39. public $cacheQueries = false;
  40. /**
  41. * Override default table name
  42. *
  43. * @var string
  44. */
  45. public $useTable = 'aros_acos';
  46. /**
  47. * Permissions link AROs with ACOs
  48. *
  49. * @var array
  50. */
  51. public $belongsTo = array('Aro', 'Aco');
  52. /**
  53. * No behaviors for this model
  54. *
  55. * @var array
  56. */
  57. public $actsAs = null;
  58. /**
  59. * Constructor, used to tell this model to use the
  60. * database configured for ACL
  61. */
  62. public function __construct() {
  63. $config = Configure::read('Acl.database');
  64. if (!empty($config)) {
  65. $this->useDbConfig = $config;
  66. }
  67. parent::__construct();
  68. }
  69. }