You've already forked Atomcms-edit
Initial commit
This commit is contained in:
Executable
+34
@@ -0,0 +1,34 @@
|
||||
<?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');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user