@@ -17,8 +17,6 @@ |
||
17 | 17 | namespace IPub\Permissions\Providers; |
18 | 18 | |
19 | 19 | use Nette; |
20 | -use Nette\Utils; |
|
21 | - |
|
22 | 20 | use IPub\Permissions\Entities; |
23 | 21 | use IPub\Permissions\Exceptions; |
24 | 22 |
@@ -32,7 +32,7 @@ |
||
32 | 32 | */ |
33 | 33 | class PermissionsProvider implements IPermissionsProvider |
34 | 34 | { |
35 | - use Nette\SmartObject; |
|
35 | + use Nette\SmartObject; |
|
36 | 36 | |
37 | 37 | /** |
38 | 38 | * @var Entities\IPermission[] |
@@ -14,11 +14,8 @@ |
||
14 | 14 | |
15 | 15 | namespace IPub\Permissions; |
16 | 16 | |
17 | -use Nette; |
|
18 | 17 | use Nette\Application; |
19 | - |
|
20 | 18 | use IPub; |
21 | -use IPub\Permissions\Security; |
|
22 | 19 | |
23 | 20 | /** |
24 | 21 | * Helper trait |
@@ -85,7 +85,7 @@ |
||
85 | 85 | return FALSE; |
86 | 86 | } |
87 | 87 | |
88 | - $actionKey = UI\Presenter::ACTION_KEY . ucfirst($action); |
|
88 | + $actionKey = UI\Presenter::ACTION_KEY.ucfirst($action); |
|
89 | 89 | |
90 | 90 | if ($presenterReflection->hasMethod($actionKey) && !$this->requirementsChecker->isAllowed($presenterReflection->getMethod($actionKey))) { |
91 | 91 | return FALSE; |
@@ -19,7 +19,6 @@ |
||
19 | 19 | use Nette; |
20 | 20 | use Nette\Application; |
21 | 21 | use Nette\Application\UI; |
22 | -use Nette\Security as NS; |
|
23 | 22 | |
24 | 23 | /** |
25 | 24 | * Create link access checker |
@@ -114,6 +114,6 @@ |
||
114 | 114 | */ |
115 | 115 | public function macroHref(MacroNode $node, PhpWriter $writer) : string |
116 | 116 | { |
117 | - return $writer->write(' ?> href="<?php echo %escape(' . ($node->name === 'plink' ? '$_presenter' : '$_control') . '->link(%node.word, %node.array?)) ?>"<?php '); |
|
117 | + return $writer->write(' ?> href="<?php echo %escape('.($node->name === 'plink' ? '$_presenter' : '$_control').'->link(%node.word, %node.array?)) ?>"<?php '); |
|
118 | 118 | } |
119 | 119 | } |
@@ -128,6 +128,6 @@ |
||
128 | 128 | */ |
129 | 129 | public function __toString() |
130 | 130 | { |
131 | - return ((string) $this->resource) . self::DELIMITER . $this->privilege; |
|
131 | + return ((string) $this->resource).self::DELIMITER.$this->privilege; |
|
132 | 132 | } |
133 | 133 | } |
@@ -20,7 +20,6 @@ |
||
20 | 20 | use Nette\Application\UI; |
21 | 21 | use Nette\Utils; |
22 | 22 | use Nette\Security as NS; |
23 | - |
|
24 | 23 | use IPub; |
25 | 24 | use IPub\Permissions\Entities; |
26 | 25 | use IPub\Permissions\Exceptions; |
@@ -18,10 +18,8 @@ |
||
18 | 18 | |
19 | 19 | use Nette; |
20 | 20 | use Nette\DI; |
21 | -use Nette\PhpGenerator as Code; |
|
22 | 21 | use Nette\Security as NS; |
23 | 22 | use Nette\Utils; |
24 | - |
|
25 | 23 | use IPub; |
26 | 24 | use IPub\Permissions; |
27 | 25 | use IPub\Permissions\Access; |
@@ -17,7 +17,6 @@ |
||
17 | 17 | namespace IPub\Permissions\Entities; |
18 | 18 | |
19 | 19 | use Nette; |
20 | - |
|
21 | 20 | use IPub; |
22 | 21 | use IPub\Permissions\Exceptions; |
23 | 22 |
@@ -23,7 +23,7 @@ |
||
23 | 23 | |
24 | 24 | class Role implements IRole |
25 | 25 | { |
26 | - use Nette\SmartObject; |
|
26 | + use Nette\SmartObject; |
|
27 | 27 | |
28 | 28 | /** |
29 | 29 | * @var string |
@@ -20,7 +20,7 @@ |
||
20 | 20 | |
21 | 21 | class Resource implements IResource |
22 | 22 | { |
23 | - use Nette\SmartObject; |
|
23 | + use Nette\SmartObject; |
|
24 | 24 | |
25 | 25 | /** |
26 | 26 | * @var string |