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