Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use “update” instead of edit in gate #10772

Merged
merged 2 commits into from
Mar 4, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Use “update” instead of edit in gate
Signed-off-by: snipe <[email protected]>
snipe committed Mar 4, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit cd120288453ca65266345a341d8b6a10da87f495
10 changes: 5 additions & 5 deletions app/Http/Controllers/AssetMaintenancesController.php
Original file line number Diff line number Diff line change
@@ -67,7 +67,7 @@ public function index()
*/
public function create()
{
$this->authorize('edit', Asset::class);
$this->authorize('update', Asset::class);
$asset = null;

if ($asset = Asset::find(request('asset_id'))) {
@@ -98,7 +98,7 @@ public function create()
*/
public function store(Request $request)
{
$this->authorize('edit', Asset::class);
$this->authorize('update', Asset::class);
// create a new model instance
$assetMaintenance = new AssetMaintenance();
$assetMaintenance->supplier_id = $request->input('supplier_id');
@@ -151,7 +151,7 @@ public function store(Request $request)
*/
public function edit($assetMaintenanceId = null)
{
$this->authorize('edit', Asset::class);
$this->authorize('update', Asset::class);
// Check if the asset maintenance exists
if (is_null($assetMaintenance = AssetMaintenance::find($assetMaintenanceId))) {
// Redirect to the improvement management page
@@ -204,7 +204,7 @@ public function edit($assetMaintenanceId = null)
*/
public function update(Request $request, $assetMaintenanceId = null)
{
$this->authorize('edit', Asset::class);
$this->authorize('update', Asset::class);
// Check if the asset maintenance exists
if (is_null($assetMaintenance = AssetMaintenance::find($assetMaintenanceId))) {
// Redirect to the asset maintenance management page
@@ -271,7 +271,7 @@ public function update(Request $request, $assetMaintenanceId = null)
*/
public function destroy($assetMaintenanceId)
{
$this->authorize('edit', Asset::class);
$this->authorize('update', Asset::class);
// Check if the asset maintenance exists
if (is_null($assetMaintenance = AssetMaintenance::find($assetMaintenanceId))) {
// Redirect to the asset maintenance management page