Skip to content

Commit e9bdb8d

Browse files
committed
Move canAccessPanel method to test User model
The canAccessPanel method was removed from the main User model and added to the test User model. This change isolates test-specific logic from the production codebase.
1 parent 3da6de1 commit e9bdb8d

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/Models/User.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,4 @@ protected static function boot()
4949
}
5050
});
5151
}
52-
53-
public function canAccessPanel(Panel $panel): bool
54-
{
55-
return true;
56-
}
5752
}

tests/src/Models/User.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,15 @@
22

33
namespace SolutionForest\InspireCms\Tests\Models;
44

5+
use Filament\Panel;
56
use Illuminate\Database\Eloquent\Factories\HasFactory;
67

78
class User extends \SolutionForest\InspireCms\Models\User
89
{
910
use HasFactory;
11+
12+
public function canAccessPanel(Panel $panel): bool
13+
{
14+
return true;
15+
}
1016
}

0 commit comments

Comments
 (0)