role check
This commit is contained in:
@@ -80,9 +80,7 @@ protected function routes(): void
|
|||||||
protected function gate(): void
|
protected function gate(): void
|
||||||
{
|
{
|
||||||
Gate::define('viewNova', function (User $user) {
|
Gate::define('viewNova', function (User $user) {
|
||||||
return in_array($user->email, [
|
return $user->role?->name === 'admin';
|
||||||
'jonathan@blijnder.nl',
|
|
||||||
]);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user