Plugins v2 cleanup (#16298)

* cleanup

* use Illuminate\Support\Facades\Auth;

* style

* add route:cache and revert

* add route:cache and revert

* fix   in pluginExample

* fix Example plugin

* style

* fix other Hooks with Illuminate\Contracts\Auth\Authenticatable

* style

* whitespace

* whitespace2

---------

Co-authored-by: Tony Murray <murraytony@gmail.com>
This commit is contained in:
PipoCanaja
2024-08-26 19:45:12 +02:00
committed by GitHub
parent a412845b22
commit 61ad4bfbbf
6 changed files with 29 additions and 7 deletions
+1 -1
View File
@@ -35,7 +35,7 @@ class DeviceOverview extends DeviceOverviewHook
// public string $view = 'resources.views.device-overview';
public function authorize(\App\Models\User $user, \App\Models\Device $device): bool
public function authorize(\Illuminate\Contracts\Auth\Authenticatable $user, \App\Models\Device $device): bool
{
// In this example, we check if the user has a custom role/permission and if it is member of any device groups
// return $user->can('view-extra-port-info') && $device->has('groups');