Files
2023-12-08 23:54:21 +05:00

74 lines
1.4 KiB
PHP

<?php
namespace App\Policies\System\Logs;
use App\Models\User;
use Laravel\Nova\Actions\ActionEvent;
class ActionEventPolicy
{
/**
* Determine whether the user can view any models.
*/
public function viewAny(User $user): bool
{
if ($user->isAdmin()) {
return true;
}
return false;
}
/**
* Determine whether the user can view the model.
*/
public function view(User $user, ActionEvent $actionEvent): bool
{
if ($user->isAdmin()) {
return true;
}
return false;
}
/**
* Determine whether the user can create models.
*/
public function create(User $user): bool
{
return false;
}
/**
* Determine whether the user can update the model.
*/
public function update(User $user, ActionEvent $actionEvent): bool
{
return false;
}
/**
* Determine whether the user can delete the model.
*/
public function delete(User $user, ActionEvent $actionEvent): bool
{
return false;
}
/**
* Determine whether the user can restore the model.
*/
public function restore(User $user, ActionEvent $actionEvent): bool
{
return false;
}
/**
* Determine whether the user can permanently delete the model.
*/
public function forceDelete(User $user, ActionEvent $actionEvent): bool
{
return false;
}
}