@@ -2,11 +2,7 @@ |
||
| 2 | 2 | namespace UserPermissions\Controller\Component; |
| 3 | 3 | |
| 4 | 4 | use Cake\Controller\Component; |
| 5 | -use Cake\Controller\ComponentRegistry; |
|
| 6 | -use Cake\Controller\Component\FlashComponent; |
|
| 7 | -use Cake\Datasource\ConnectionManager; |
|
| 8 | 5 | use Cake\Log\Log; |
| 9 | -use Cake\ORM\TableRegistry; |
|
| 10 | 6 | use UserPermissions\Exception\MissingHandlerException; |
| 11 | 7 | |
| 12 | 8 | class UserPermissionsComponent extends Component { |
@@ -179,7 +179,9 @@ |
||
| 179 | 179 | private function searchForApplyViewRules($key, $value) |
| 180 | 180 | { |
| 181 | 181 | if($key == $this->action) { |
| 182 | - if(!$this->checkForHandler($this->controller, $value)) return; |
|
| 182 | + if(!$this->checkForHandler($this->controller, $value)) { |
|
| 183 | + return; |
|
| 184 | + } |
|
| 183 | 185 | |
| 184 | 186 | if(!$this->controller->$value()){ |
| 185 | 187 | $this->redirectIfIsSet(); |