Source for file IPermissionAssertion.php

Documentation is available at IPermissionAssertion.php

  1. 1: <?php
  2. 2:  
  3. 3: /**
  4. 4:  * Nette Framework
  5. 5:  *
  6. 6:  * Copyright (c) 2004, 2009 David Grudl (http://davidgrudl.com)
  7. 7:  *
  8. 8:  * This source file is subject to the "Nette license" that is bundled
  9. 9:  * with this package in the file license.txt.
  10. 10:  *
  11. 11:  * For more information please see https://nette.org
  12. 12:  *
  13. 13:  * @copyright  Copyright (c) 2004, 2009 David Grudl
  14. 14:  * @license    https://nette.org/license  Nette license
  15. 15:  * @link       https://nette.org
  16. 16:  * @category   Nette
  17. 17:  * @package    Nette\Security
  18. 18:  * @version    $Id$
  19. 19:  */
  20. 20:  
  21. 21:  
  22. 22:  
  23. 23: /**
  24. 24:  * Represents conditional ACL Rules with Assertions.
  25. 25:  *
  26. 26:  * @author     David Grudl
  27. 27:  * @copyright  Copyright (c) 2004, 2009 David Grudl
  28. 28:  * @package    Nette\Security
  29. 29:  */
  30. 31: {
  31. 32:     /**
  32. 33:      * Returns true if and only if the assertion conditions are met.
  33. 34:      *
  34. 35:      * This method is passed the ACL, Role, Resource, and privilege to which the authorization query applies. If the
  35. 36:      * $role, $resource, or $privilege parameters are Permission::ALL, it means that the query applies to all Roles,
  36. 37:      * Resources, or privileges, respectively.
  37. 38:      *
  38. 39:      * @param  Permission 
  39. 40:      * @param  string  role
  40. 41:      * @param  string  resource
  41. 42:      * @param  string|NULL privilege
  42. 43:      * @return bool 
  43. 44:      */
  44. 45:     public function assert(Permission $acl$roleId$resourceId$privilege);
  45. 46: }