forked from CakeDC/users
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRule.php
More file actions
27 lines (25 loc) · 946 Bytes
/
Copy pathRule.php
File metadata and controls
27 lines (25 loc) · 946 Bytes
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
<?php
/**
* Copyright 2010 - 2015, Cake Development Corporation (+1 702 425 5085) (http://cakedc.com)
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright 2010 - 2015, Cake Development Corporation (+1 702 425 5085) (http://cakedc.com)
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
namespace CakeDC\Users\Auth\Rules;
use Cake\Network\Request;
interface Rule
{
/**
* Check the current entity is owned by the logged in user
*
* @param array $user Auth array with the logged in data
* @param string $role role of the user
* @param Request $request current request, used to get a default table if not provided
* @return bool
* @throws \OutOfBoundsException if table is not found or it doesn't have the expected fields
*/
public function allowed(array $user, $role, Request $request);
}