@@ -15,7 +15,9 @@ |
||
15 | 15 | */ |
16 | 16 | public function authorize() |
17 | 17 | { |
18 | - if ($this->hasPermissionTo('update-users')) return true; |
|
18 | + if ($this->hasPermissionTo('update-users')) { |
|
19 | + return true; |
|
20 | + } |
|
19 | 21 | return false; |
20 | 22 | } |
21 | 23 |
@@ -16,7 +16,9 @@ |
||
16 | 16 | */ |
17 | 17 | public function authorize() |
18 | 18 | { |
19 | - if ($this->hasPermissionTo('list-users')) return true; |
|
19 | + if ($this->hasPermissionTo('list-users')) { |
|
20 | + return true; |
|
21 | + } |
|
20 | 22 | return false; |
21 | 23 | } |
22 | 24 |
@@ -15,7 +15,9 @@ |
||
15 | 15 | */ |
16 | 16 | public function authorize() |
17 | 17 | { |
18 | - if ($this->hasPermissionTo('destroy-users')) return true; |
|
18 | + if ($this->hasPermissionTo('destroy-users')) { |
|
19 | + return true; |
|
20 | + } |
|
19 | 21 | return false; |
20 | 22 | } |
21 | 23 |
@@ -15,7 +15,9 @@ |
||
15 | 15 | */ |
16 | 16 | public function authorize() |
17 | 17 | { |
18 | - if ($this->hasPermissionTo('show-users')) return true; |
|
18 | + if ($this->hasPermissionTo('show-users')) { |
|
19 | + return true; |
|
20 | + } |
|
19 | 21 | return false; |
20 | 22 | } |
21 | 23 |
@@ -15,7 +15,9 @@ |
||
15 | 15 | */ |
16 | 16 | public function authorize() |
17 | 17 | { |
18 | - if ($this->hasPermissionTo('store-users')) return true; |
|
18 | + if ($this->hasPermissionTo('store-users')) { |
|
19 | + return true; |
|
20 | + } |
|
19 | 21 | return false; |
20 | 22 | } |
21 | 23 |
@@ -19,7 +19,9 @@ discard block |
||
19 | 19 | */ |
20 | 20 | protected function hasPermissionTo($permission) |
21 | 21 | { |
22 | - if (Auth::user()->hasPermissionTo($permission)) return true; |
|
22 | + if (Auth::user()->hasPermissionTo($permission)) { |
|
23 | + return true; |
|
24 | + } |
|
23 | 25 | return false; |
24 | 26 | } |
25 | 27 | |
@@ -35,7 +37,9 @@ discard block |
||
35 | 37 | { |
36 | 38 | //todo |
37 | 39 | |
38 | - if (Auth::user()->id == $this->$model->$field) return true; |
|
40 | + if (Auth::user()->id == $this->$model->$field) { |
|
41 | + return true; |
|
42 | + } |
|
39 | 43 | return false; |
40 | 44 | } |
41 | 45 | } |
42 | 46 | \ No newline at end of file |