| Total Complexity | 4 |
| Total Lines | 15 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 27 | class TUserOwnerRule extends TAuthorizationRule |
||
| 28 | { |
||
| 29 | /** |
||
| 30 | * @param \Prado\Security\IUser $user the user object |
||
| 31 | * @param string $verb the request verb (GET, PUT) |
||
| 32 | * @param string $ip the request IP address |
||
| 33 | * @param null|array $extra extra data username to validate |
||
| 34 | * @return int 1 if the user is allowed, -1 if the user is denied, 0 if the rule does not apply to the user |
||
| 35 | */ |
||
| 36 | public function isUserAllowed(IUser $user, $verb, $ip, $extra = null) |
||
| 45 |