Compare commits
2 Commits
a8ad07676a
...
f63be7fa5e
| Author | SHA1 | Date | |
|---|---|---|---|
| f63be7fa5e | |||
|
|
7fa8b75b29 |
@@ -4,6 +4,7 @@ namespace App\Providers;
|
||||
|
||||
use App\Policies\RolePolicy;
|
||||
use Illuminate\Support\Facades\Gate;
|
||||
use Illuminate\Support\Facades\URL;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use Spatie\Permission\Models\Role;
|
||||
|
||||
@@ -22,6 +23,10 @@ class AppServiceProvider extends ServiceProvider
|
||||
*/
|
||||
public function boot(): void
|
||||
{
|
||||
if ($this->app->environment('production')) {
|
||||
URL::forceScheme('https');
|
||||
}
|
||||
|
||||
Gate::before(function ($user, $ability) {
|
||||
return $user->hasRole('super_admin') ? true : null;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user