mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-01 19:47:11 +00:00
Fix routes.
This commit is contained in:
@@ -121,11 +121,11 @@ Route::group(
|
|||||||
Route::post('logout', ['uses' => 'Auth\LoginController@logout', 'as' => 'logout']);
|
Route::post('logout', ['uses' => 'Auth\LoginController@logout', 'as' => 'logout']);
|
||||||
Route::get('flush', ['uses' => 'DebugController@flush', 'as' => 'flush']);
|
Route::get('flush', ['uses' => 'DebugController@flush', 'as' => 'flush']);
|
||||||
Route::get('routes', ['uses' => 'DebugController@routes', 'as' => 'routes']);
|
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.
|
// For the two factor routes, the user must be logged in, but NOT 2FA. Account confirmation does not matter here.
|
||||||
Route::group(
|
Route::group(
|
||||||
['middleware' => 'user-logged-in-no-2fa', 'prefix' => 'two-factor', 'as' => 'two-factor.', 'namespace' => 'FireflyIII\Http\Controllers\Auth'],
|
['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 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.
|
// Home Controller.
|
||||||
Route::group(
|
Route::group(
|
||||||
['middleware' => ['user-full-auth'], 'namespace' => 'FireflyIII\Http\Controllers'],
|
['middleware' => ['user-full-auth'], 'namespace' => 'FireflyIII\Http\Controllers'],
|
||||||
|
|||||||
Reference in New Issue
Block a user