remove unecessary gates for users routes and add UserPolicy

This commit is contained in:
Giovanni committed 2025-12-17 16:52:43 +01:00
1 parent 4c3647fe30
commit a0e95aca3e
16 files changed
+30 -19

No files matched your search

+2 -11
View File
@@ -3,6 +3,7 @@
namespace App\Providers;
use App\Models\User;
use App\Policies\UserPolicy;
use Illuminate\Support\Facades\Gate;
use Illuminate\Support\ServiceProvider;
@@ -21,16 +22,6 @@ class GateServiceProvider extends ServiceProvider
*/
public function boot(): void
{
Gate::define('me', function (User $user) {
return true;
});
Gate::define('getUserTasks', function (User $user) {
return true;
});
Gate::define('searchUsers', function (User $user) {
return true;
});
Gate::policy(User::class, UserPolicy::class);
}
}