mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
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:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user