@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | |
82 | 82 | if (!$request->isXmlHttpRequest() && $request->isMethod('GET')) { |
83 | 83 | $input = $request->input(); |
84 | - unset($input['_switch_user']); |
|
84 | + unset($input[ '_switch_user' ]); |
|
85 | 85 | $input += $request->route()->parameters(); |
86 | 86 | |
87 | 87 | return $this->redirect->route( |
@@ -104,11 +104,11 @@ discard block |
||
104 | 104 | */ |
105 | 105 | protected function checkPermission(string $username) |
106 | 106 | { |
107 | - $ability = $this->config->get('pretend.impersonate.auth_check'); |
|
107 | + $ability = $this->config->get('pretend.impersonate.auth_check'); |
|
108 | 108 | |
109 | 109 | if (!$this->gate->has($ability)) { |
110 | 110 | |
111 | - $this->gate->define($ability, function ($user): bool { |
|
111 | + $this->gate->define($ability, function($user): bool { |
|
112 | 112 | if (!$user instanceof Impersonable) { |
113 | 113 | return false; |
114 | 114 | } |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | }); |
118 | 118 | } |
119 | 119 | |
120 | - if (!$this->gate->forUser($this->guard->user())->check($ability, [$username])) { |
|
120 | + if (!$this->gate->forUser($this->guard->user())->check($ability, [ $username ])) { |
|
121 | 121 | abort(403, "Current user have no ability '{$ability}'"); |
122 | 122 | } |
123 | 123 | } |