From 49b95d21db588c1d2dbde4adc8a7e36e0a13ad6c Mon Sep 17 00:00:00 2001 From: didier Date: Sun, 8 Dec 2024 14:24:08 +0100 Subject: [PATCH] fix patching rights --- app/Http/Controllers/Admin/PatchingController.php | 2 +- resources/views/admin/roles/edit.blade.php | 15 +++++++++++++++ resources/views/layouts/admin.blade.php | 2 +- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/Admin/PatchingController.php b/app/Http/Controllers/Admin/PatchingController.php index fc8fcbb9..7a7d153d 100644 --- a/app/Http/Controllers/Admin/PatchingController.php +++ b/app/Http/Controllers/Admin/PatchingController.php @@ -15,7 +15,7 @@ class PatchingController extends Controller { public function index(Request $request) { - abort_if(Gate::denies('patching_access'), Response::HTTP_FORBIDDEN, '403 Forbidden'); + abort_if(Gate::denies('patching_show'), Response::HTTP_FORBIDDEN, '403 Forbidden'); // Get Attributes $attributes_list = $this->getAttributes(); diff --git a/resources/views/admin/roles/edit.blade.php b/resources/views/admin/roles/edit.blade.php index 286a0d2c..0206770b 100644 --- a/resources/views/admin/roles/edit.blade.php +++ b/resources/views/admin/roles/edit.blade.php @@ -1652,6 +1652,21 @@ +
+
+ + @php($permission = $permissions_sorted['patching']) +
+ permissions->contains($permission['actions'][0][0]) ? 'checked' : '' }}> + +
+
+ permissions->contains($permission['actions'][1][0]) ? 'checked' : '' }}> + +
+
+
+ diff --git a/resources/views/layouts/admin.blade.php b/resources/views/layouts/admin.blade.php index 74d2e424..63225a58 100644 --- a/resources/views/layouts/admin.blade.php +++ b/resources/views/layouts/admin.blade.php @@ -156,7 +156,7 @@ {{ trans('panel.menu.tools') }}