AclInterface.php 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <?php
  2. /**
  3. * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
  4. * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
  5. *
  6. * Licensed under The MIT License
  7. * Redistributions of files must retain the above copyright notice.
  8. *
  9. * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
  10. * @link http://cakephp.org CakePHP(tm) Project
  11. * @package Cake.Controller.Component.Acl
  12. * @since CakePHP(tm) v 0.10.0.1076
  13. * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
  14. */
  15. /**
  16. * Access Control List interface.
  17. * Implementing classes are used by AclComponent to perform ACL checks in Cake.
  18. *
  19. * @package Cake.Controller.Component.Acl
  20. */
  21. interface AclInterface {
  22. /**
  23. * Empty method to be overridden in subclasses
  24. *
  25. * @param string $aro ARO The requesting object identifier.
  26. * @param string $aco ACO The controlled object identifier.
  27. * @param string $action Action (defaults to *)
  28. */
  29. public function check($aro, $aco, $action = "*");
  30. /**
  31. * Allow methods are used to grant an ARO access to an ACO.
  32. *
  33. * @param string $aro ARO The requesting object identifier.
  34. * @param string $aco ACO The controlled object identifier.
  35. * @param string $action Action (defaults to *)
  36. * @return boolean Success
  37. */
  38. public function allow($aro, $aco, $action = "*");
  39. /**
  40. * Deny methods are used to remove permission from an ARO to access an ACO.
  41. *
  42. * @param string $aro ARO The requesting object identifier.
  43. * @param string $aco ACO The controlled object identifier.
  44. * @param string $action Action (defaults to *)
  45. * @return boolean Success
  46. */
  47. public function deny($aro, $aco, $action = "*");
  48. /**
  49. * Inherit methods modify the permission for an ARO to be that of its parent object.
  50. *
  51. * @param string $aro ARO The requesting object identifier.
  52. * @param string $aco ACO The controlled object identifier.
  53. * @param string $action Action (defaults to *)
  54. * @return boolean Success
  55. */
  56. public function inherit($aro, $aco, $action = "*");
  57. /**
  58. * Initialization method for the Acl implementation
  59. *
  60. * @param AclComponent $component
  61. */
  62. public function initialize(Component $component);
  63. }