mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-01-03 12:47:17 -06:00
Move authentication around.
This commit is contained in:
parent
c0fad106f0
commit
fd9a7080ea
@ -26,6 +26,7 @@ class AccountController extends Controller
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware('auth');
|
||||
parent::__construct();
|
||||
View::share('mainTitleIcon', 'fa-credit-card');
|
||||
View::share('title', trans('firefly.accounts'));
|
||||
|
@ -29,6 +29,7 @@ class AttachmentController extends Controller
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware('auth');
|
||||
parent::__construct();
|
||||
View::share('mainTitleIcon', 'fa-paperclip');
|
||||
View::share('title', trans('firefly.attachments'));
|
||||
|
@ -22,6 +22,8 @@ use Validator;
|
||||
|
||||
class AuthController extends Controller
|
||||
{
|
||||
protected $guard = 'session';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Registration & Login Controller
|
||||
@ -93,7 +95,7 @@ class AuthController extends Controller
|
||||
$credentials = $this->getCredentials($request);
|
||||
$credentials['blocked'] = 0; // most not be blocked.
|
||||
|
||||
if (Auth::guard($this->getGuard())->attempt($credentials, true)) {
|
||||
if (Auth::guard($this->getGuard())->attempt($credentials, $request->has('remember'))) {
|
||||
return $this->handleUserWasAuthenticated($request, $throttles);
|
||||
}
|
||||
|
||||
|
@ -24,6 +24,7 @@ class BillController extends Controller
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware('auth');
|
||||
parent::__construct();
|
||||
View::share('title', trans('firefly.bills'));
|
||||
View::share('mainTitleIcon', 'fa-calendar-o');
|
||||
|
@ -30,6 +30,7 @@ class BudgetController extends Controller
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware('auth');
|
||||
parent::__construct();
|
||||
View::share('title', trans('firefly.budgets'));
|
||||
View::share('mainTitleIcon', 'fa-tasks');
|
||||
|
@ -29,6 +29,7 @@ class CategoryController extends Controller
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware('auth');
|
||||
parent::__construct();
|
||||
View::share('title', trans('firefly.categories'));
|
||||
View::share('mainTitleIcon', 'fa-bar-chart');
|
||||
|
@ -28,6 +28,7 @@ class AccountController extends Controller
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware('auth');
|
||||
parent::__construct();
|
||||
// create chart generator:
|
||||
$this->generator = app('FireflyIII\Generator\Chart\Account\AccountChartGenerator');
|
||||
|
@ -27,6 +27,7 @@ class BillController extends Controller
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware('auth');
|
||||
parent::__construct();
|
||||
// create chart generator:
|
||||
$this->generator = app('FireflyIII\Generator\Chart\Bill\BillChartGenerator');
|
||||
|
@ -31,6 +31,7 @@ class BudgetController extends Controller
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware('auth');
|
||||
parent::__construct();
|
||||
// create chart generator:
|
||||
$this->generator = app('FireflyIII\Generator\Chart\Budget\BudgetChartGenerator');
|
||||
|
@ -31,6 +31,7 @@ class CategoryController extends Controller
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware('auth');
|
||||
parent::__construct();
|
||||
// create chart generator:
|
||||
$this->generator = app('FireflyIII\Generator\Chart\Category\CategoryChartGenerator');
|
||||
|
@ -26,6 +26,7 @@ class PiggyBankController extends Controller
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware('auth');
|
||||
parent::__construct();
|
||||
// create chart generator:
|
||||
$this->generator = app('FireflyIII\Generator\Chart\PiggyBank\PiggyBankChartGenerator');
|
||||
|
@ -26,6 +26,7 @@ class ReportController extends Controller
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware('auth');
|
||||
parent::__construct();
|
||||
// create chart generator:
|
||||
$this->generator = app('FireflyIII\Generator\Chart\Report\ReportChartGenerator');
|
||||
|
@ -34,6 +34,7 @@ class CsvController extends Controller
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware('auth');
|
||||
parent::__construct();
|
||||
View::share('title', trans('firefly.csv'));
|
||||
View::share('mainTitleIcon', 'fa-file-text-o');
|
||||
|
@ -25,6 +25,7 @@ class CurrencyController extends Controller
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware('auth');
|
||||
parent::__construct();
|
||||
View::share('title', trans('firefly.currencies'));
|
||||
View::share('mainTitleIcon', 'fa-usd');
|
||||
|
@ -11,6 +11,10 @@ use Response;
|
||||
*/
|
||||
class HelpController extends Controller
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware('auth');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param HelpInterface $help
|
||||
|
@ -6,6 +6,7 @@ use Config;
|
||||
use FireflyIII\Models\Tag;
|
||||
use FireflyIII\Repositories\Account\AccountRepositoryInterface as ARI;
|
||||
use Input;
|
||||
use Log;
|
||||
use Preferences;
|
||||
use Session;
|
||||
use Steam;
|
||||
@ -17,6 +18,10 @@ use Steam;
|
||||
*/
|
||||
class HomeController extends Controller
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware('auth');
|
||||
}
|
||||
|
||||
public function dateRange()
|
||||
{
|
||||
@ -68,6 +73,7 @@ class HomeController extends Controller
|
||||
*/
|
||||
public function index(ARI $repository)
|
||||
{
|
||||
Log::debug('You are at index.');
|
||||
$types = Config::get('firefly.accountTypesByIdentifier.asset');
|
||||
$count = $repository->countAccounts($types);
|
||||
bcscale(2);
|
||||
|
@ -20,6 +20,10 @@ use Session;
|
||||
*/
|
||||
class JsonController extends Controller
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware('auth');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
|
@ -17,6 +17,10 @@ use View;
|
||||
*/
|
||||
class NewUserController extends Controller
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware('auth');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
|
@ -31,6 +31,7 @@ class PiggyBankController extends Controller
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware('auth');
|
||||
parent::__construct();
|
||||
View::share('title', trans('firefly.piggyBanks'));
|
||||
View::share('mainTitleIcon', 'fa-sort-amount-asc');
|
||||
|
@ -20,6 +20,7 @@ class PreferencesController extends Controller
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware('auth');
|
||||
parent::__construct();
|
||||
View::share('title', trans('firefly.preferences'));
|
||||
View::share('mainTitleIcon', 'fa-gear');
|
||||
|
@ -15,6 +15,10 @@ use Session;
|
||||
*/
|
||||
class ProfileController extends Controller
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware('auth');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\View\View
|
||||
|
@ -16,6 +16,7 @@ use View;
|
||||
class ReportController extends Controller
|
||||
{
|
||||
|
||||
|
||||
/** @var ReportHelperInterface */
|
||||
protected $helper;
|
||||
|
||||
@ -26,6 +27,7 @@ class ReportController extends Controller
|
||||
*/
|
||||
public function __construct(ReportHelperInterface $helper)
|
||||
{
|
||||
$this->middleware('auth');
|
||||
parent::__construct();
|
||||
$this->helper = $helper;
|
||||
|
||||
|
@ -10,6 +10,11 @@ use Input;
|
||||
*/
|
||||
class SearchController extends Controller
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware('auth');
|
||||
}
|
||||
|
||||
/**
|
||||
* Results always come in the form of an array [results, count, fullCount]
|
||||
*
|
||||
|
@ -39,6 +39,7 @@ class TagController extends Controller
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware('auth');
|
||||
parent::__construct();
|
||||
View::share('title', 'Tags');
|
||||
View::share('mainTitleIcon', 'fa-tags');
|
||||
|
@ -37,6 +37,7 @@ class TransactionController extends Controller
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware('auth');
|
||||
parent::__construct();
|
||||
View::share('title', trans('firefly.transactions'));
|
||||
View::share('mainTitleIcon', 'fa-repeat');
|
||||
|
@ -265,13 +265,13 @@ Route::group(
|
||||
['middleware' => 'web'], function () {
|
||||
Route::auth();
|
||||
|
||||
Route::get('/home', 'HomeController@index');
|
||||
//Route::get('/home', 'HomeController@index');
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
Route::group(
|
||||
['middleware' => ['auth', 'range', 'web']], function () {
|
||||
['middleware' => ['range', 'web']], function () {
|
||||
|
||||
/**
|
||||
* Home Controller
|
||||
|
Loading…
Reference in New Issue
Block a user