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 <[email protected]>
This commit is contained in:
co-authored by
GitHub
Tony Murray
parent
a412845b22
commit
61ad4bfbbf
@@ -39,7 +39,7 @@ class Page extends PageHook
|
||||
|
||||
// The authorize method will determine if the user has access to this page.
|
||||
// if you want all users to be able to access this page simple return true
|
||||
public function authorize(\App\Models\User $user): bool
|
||||
public function authorize(\Illuminate\Contracts\Auth\Authenticatable $user): bool
|
||||
{
|
||||
// you can check user's roles like this:
|
||||
// return $user->can('admin');
|
||||
|
||||
Reference in New Issue
Block a user