mirror of
https://github.com/filamentphp/filament.git
synced 2026-09-24 15:42:09 +08:00
Remove policies for now
This commit is contained in:
@@ -34,7 +34,6 @@ class FilamentServiceProvider extends ServiceProvider
|
||||
public function boot(): void
|
||||
{
|
||||
$this->bootModelBindings();
|
||||
$this->bootPolicies();
|
||||
$this->bootResources();
|
||||
$this->bootDirectives();
|
||||
$this->bootResourceModels();
|
||||
@@ -78,13 +77,6 @@ class FilamentServiceProvider extends ServiceProvider
|
||||
$this->app->bind('Filament\User', $models['user']);
|
||||
}
|
||||
|
||||
protected function bootPolicies(): void
|
||||
{
|
||||
Gate::guessPolicyNamesUsing(function ($modelClass) {
|
||||
return 'Filament\\Policies\\'.class_basename($modelClass).'Policy';
|
||||
});
|
||||
}
|
||||
|
||||
protected function bootResources(): void
|
||||
{
|
||||
$this->loadViewsFrom(__DIR__.'/../resources/views', 'filament');
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace Filament\Http\Livewire\Auth;
|
||||
|
||||
use App\Providers\RouteServiceProvider;
|
||||
use Illuminate\Auth\Events\PasswordReset;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Filament\Policies;
|
||||
|
||||
use Illuminate\Auth\Access\HandlesAuthorization;
|
||||
use App\Models\User;
|
||||
|
||||
class UserPolicy
|
||||
{
|
||||
use HandlesAuthorization;
|
||||
|
||||
/**
|
||||
* Determine whether the user can create models.
|
||||
*
|
||||
* @param \App\Models\User $user
|
||||
* @return mixed
|
||||
*/
|
||||
public function create(User $user)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user