forked from crisu83/yii-auth
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathICachedAuthManager.php
33 lines (31 loc) · 1.18 KB
/
ICachedAuthManager.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
/**
* ICachedAuthManager class file.
* @author Christoffer Niska <[email protected]>
* @copyright Copyright © Christoffer Niska 2012-
* @license http://www.opensource.org/licenses/bsd-license.php New BSD License
* @package auth.components
*/
/**
* Interface for cached authorization managers.
*/
interface ICachedAuthManager
{
/**
* Performs access check for the specified user.
* @param string $itemName the name of the operation that need access check.
* @param integer $userId the user id.
* @param array $params name-value pairs that would be passed to biz rules associated
* with the tasks and roles assigned to the user.
* @param boolean $allowCaching whether to allow caching the result of access check.
* @return boolean whether the operations can be performed by the user.
*/
public function checkAccess($itemName, $userId, $params = array(), $allowCaching = true);
/**
* Flushes the access cache for the specified user.
* @param string $itemName the name of the operation that need access check.
* @param integer $userId the user id.
* @return boolean whether access was flushed.
*/
public function flushAccess($itemName, $userId);
}