You've already forked Atomcms-edit
35 lines
650 B
PHP
Executable File
35 lines
650 B
PHP
Executable File
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Policies;
|
|
|
|
use App\Models\User;
|
|
use Illuminate\Auth\Access\HandlesAuthorization;
|
|
use Illuminate\Auth\Access\Response;
|
|
|
|
class BanPolicy
|
|
{
|
|
use HandlesAuthorization;
|
|
|
|
/**
|
|
* Determine whether the user can view any models.
|
|
*
|
|
* @return Response|bool
|
|
*/
|
|
public function viewAny(User $user)
|
|
{
|
|
return hasHousekeepingPermission('manage_bans');
|
|
}
|
|
|
|
/**
|
|
* Determine whether the user can delete the model.
|
|
*
|
|
* @return Response|bool
|
|
*/
|
|
public function delete(User $user)
|
|
{
|
|
return hasHousekeepingPermission('manage_bans');
|
|
}
|
|
}
|