rename UserPolicy to UsersPolicy
This commit is contained in:
@@ -3,17 +3,17 @@
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Models\Events;
|
||||
use http\Env\Response;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Support\Facades\Gate;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use PHPUnit\Event\Event;
|
||||
|
||||
class EventsController extends Controller
|
||||
{
|
||||
public function create(Request $request): JsonResponse
|
||||
{
|
||||
|
||||
|
||||
if (Gate::denies('create', Events::class)) {
|
||||
return response()->json(['message' => 'Forbidden'], 403);
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace App\Policies;
|
||||
use App\Models\User;
|
||||
use Illuminate\Auth\Access\Response;
|
||||
|
||||
class UserPolicy
|
||||
class UsersPolicy
|
||||
{
|
||||
public function deleteOther(User $user, User $model): bool
|
||||
{
|
||||
@@ -7,7 +7,7 @@ use App\Models\Task;
|
||||
use App\Models\User;
|
||||
use App\Policies\EventsPolicy;
|
||||
use App\Policies\TasksPolicy;
|
||||
use App\Policies\UserPolicy;
|
||||
use App\Policies\UsersPolicy;
|
||||
use Illuminate\Support\Facades\Gate;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
@@ -26,7 +26,7 @@ class GateServiceProvider extends ServiceProvider
|
||||
*/
|
||||
public function boot(): void
|
||||
{
|
||||
Gate::policy(User::class, UserPolicy::class);
|
||||
Gate::policy(User::class, UsersPolicy::class);
|
||||
Gate::policy(Events::class, EventsPolicy::class);
|
||||
Gate::policy(Task::class, TasksPolicy::class);
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1
-1
@@ -5,7 +5,7 @@
|
||||
<link rel="icon" type="image/svg+xml" href="logoIcone.png" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Comité des fêtes de Beaupont</title>
|
||||
<script type="module" crossorigin src="/assets/index-1oYDhgBl.js"></script>
|
||||
<script type="module" crossorigin src="/assets/index-4OUq_vxg.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-DBz-GVvs.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -17,7 +17,7 @@ body:json {
|
||||
}
|
||||
|
||||
vars:pre-request {
|
||||
role: 2
|
||||
role: 1
|
||||
id: 12
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
headers {
|
||||
Accept: application/json
|
||||
X-XSRF-TOKEN: eyJpdiI6ImhRZnBQM1N5RFQ4L0duVm5wMEdHcUE9PSIsInZhbHVlIjoiSXFYdGt6Uk1vRUNmYnpnRXNXMVpzeW5sWTlBaW1yRmsvWG9pR01JQnYyTzNvclpoaVZZUkgwL2VYWlBjaEYzcDVnUXprUnBFa3dVL09nTVphQUhsTEtENjhjbUFoRzB0RkMzenRleit1SXVWQWFqNTgwSWFMZ0RuNHNtenpDQ1ciLCJtYWMiOiJmMDM4YjVhMDAzNjE0Y2VlZTY0NDA2YTY5ZWRmYjExZTRkYzlhNmIzMWNmNjcyMmIxYTg0YjFhNWUxZDZlMDM1IiwidGFnIjoiIn0=
|
||||
X-XSRF-TOKEN: eyJpdiI6IkdOazgycU5wUThPNWU4RTBTQ1JaRWc9PSIsInZhbHVlIjoidFZQQXh1WStoQ3pwTXpsQnBFNklLb1puRGpEMHp4aS9lM2hXYTN2SmtLN28zU3V3cEFpclR6dXhMMmN6eDBFcFB3VHdGcG8xN1d2a2RMa05DNTFBcTR6T0JNUFllUWtBanY5clMwb1JpL3Vjb211YW5YRk5tTG8yLzFRWkQ4SEIiLCJtYWMiOiJmYjRhMjczNDY2NzZkNmViYzg5ODJhMDViZjc3NTRmZjU5OWUxZGRlOTRlNGVjZGJhZDAyODY3NTAyNDNmZWM0IiwidGFnIjoiIn0=
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user