Pilots cannot use the dashboard or flights without admin rights (#481)
* Use auth middleware instead of specific groups for logged in state * Auth check for admin access * Check user admin access for updates * Formatting
This commit is contained in:
@@ -4,6 +4,8 @@
|
||||
* User doesn't need to be logged in for these
|
||||
*/
|
||||
use App\Http\Middleware\SetActiveTheme;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
Route::group([
|
||||
'namespace' => 'Frontend', 'prefix' => '', 'as' => 'frontend.',
|
||||
@@ -24,7 +26,7 @@ Route::group([
|
||||
*/
|
||||
Route::group([
|
||||
'namespace' => 'Frontend', 'prefix' => '', 'as' => 'frontend.',
|
||||
'middleware' => ['role:admin|user', SetActiveTheme::class],
|
||||
'middleware' => ['auth', SetActiveTheme::class],
|
||||
], function () {
|
||||
Route::resource('dashboard', 'DashboardController');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user