Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
12 changes: 11 additions & 1 deletion app/Policies/ResultPolicy.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function create(User $user)
*/
public function update(User $user, Result $result)
{
//
return true;
}

/**
Expand All @@ -60,6 +60,16 @@ public function delete(User $user, Result $result)
return true;
}

/**
* Determine whether the user can delete multiple models.
*
* @return \Illuminate\Auth\Access\Response|bool
*/
public function deleteAny(User $user)
{
return true;
}

/**
* Determine whether the user can restore the model.
*
Expand Down
4 changes: 4 additions & 0 deletions app/Providers/AuthServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@

// use Illuminate\Support\Facades\Gate;

// TODO: remove package and policy as FailedJob is no longer included
use Amvisor\FilamentFailedJobs\Models\FailedJob;
use App\Models\Result;
use App\Policies\FailedJobPolicy;
use App\Policies\ResultPolicy;
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;

class AuthServiceProvider extends ServiceProvider
Expand All @@ -17,6 +20,7 @@ class AuthServiceProvider extends ServiceProvider
*/
protected $policies = [
FailedJob::class => FailedJobPolicy::class,
Result::class => ResultPolicy::class,
];

/**
Expand Down