Fix routes.

This commit is contained in:
James Cole
2025-10-26 10:09:59 +01:00
parent c43821e29c
commit d25ae50d30

View File

@@ -121,11 +121,11 @@ Route::group(
Route::post('logout', ['uses' => 'Auth\LoginController@logout', 'as' => 'logout']);
Route::get('flush', ['uses' => 'DebugController@flush', 'as' => 'flush']);
Route::get('routes', ['uses' => 'DebugController@routes', 'as' => 'routes']);
Route::get('debug', 'DebugController@index')->name('debug');
Route::get('debug/api-test', 'DebugController@apiTest')->name('api-test');
}
);
// For the two factor routes, the user must be logged in, but NOT 2FA. Account confirmation does not matter here.
Route::group(
['middleware' => 'user-logged-in-no-2fa', 'prefix' => 'two-factor', 'as' => 'two-factor.', 'namespace' => 'FireflyIII\Http\Controllers\Auth'],
@@ -137,6 +137,16 @@ Route::group(
// For all other routes, the user must be fully authenticated and have an activated account.
// For some other routes, it is only relevant that the user is authenticated.
Route::group(
['middleware' => 'user-full-auth', 'namespace' => 'FireflyIII\Http\Controllers'],
static function (): void {
Route::get('debug', 'DebugController@index')->name('debug');
Route::get('debug/api-test', 'DebugController@apiTest')->name('api-test');
}
);
// Home Controller.
Route::group(
['middleware' => ['user-full-auth'], 'namespace' => 'FireflyIII\Http\Controllers'],