From 3be68ec7216bdbe4a03ee995a1f2397ca8f59051 Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 18 Jul 2018 03:43:45 -0700 Subject: [PATCH] Fix location edit permissions --- app/Http/Controllers/LocationsController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/LocationsController.php b/app/Http/Controllers/LocationsController.php index 8a5e3c531a..5f3de56fb8 100755 --- a/app/Http/Controllers/LocationsController.php +++ b/app/Http/Controllers/LocationsController.php @@ -126,7 +126,7 @@ class LocationsController extends Controller */ public function edit($locationId = null) { - $this->authorize('edit', Location::class); + $this->authorize('update', Location::class); // Check if the location exists if (is_null($item = Location::find($locationId))) { return redirect()->route('locations.index')->with('error', trans('admin/locations/message.does_not_exist')); @@ -154,7 +154,7 @@ class LocationsController extends Controller */ public function update(ImageUploadRequest $request, $locationId = null) { - $this->authorize('edit', Location::class); + $this->authorize('update', Location::class); // Check if the location exists if (is_null($location = Location::find($locationId))) { return redirect()->route('locations.index')->with('error', trans('admin/locations/message.does_not_exist'));