mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-08 14:14:31 -04:00
Disable commercial website unless it has NINJA_PROD or NINJA_DEV env set
This commit is contained in:
parent
f2de3f8a81
commit
5ad67f55e1
1
.gitignore
vendored
1
.gitignore
vendored
@ -18,3 +18,4 @@
|
||||
/tests/_log
|
||||
.idea
|
||||
.project
|
||||
/nbproject/private/
|
@ -66,7 +66,13 @@ App::after(function($request, $response)
|
||||
|
||||
Route::filter('auth', function()
|
||||
{
|
||||
if (Auth::guest()) return Redirect::guest('/');
|
||||
if (Auth::guest()) {
|
||||
if(Utils::isNinja()) {
|
||||
return Redirect::guest('/');
|
||||
} else {
|
||||
return Redirect::guest('/login');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
||||
//dd(gethostname());
|
||||
//Log::error('test');
|
||||
|
||||
|
||||
if(Utils::isNinja()) {
|
||||
Route::get('/', 'HomeController@showWelcome');
|
||||
Route::get('/rocksteady', 'HomeController@showWelcome');
|
||||
Route::get('/about', 'HomeController@showAboutUs');
|
||||
@ -46,6 +46,11 @@ Route::get('complete', 'PaymentController@offsite_payment');
|
||||
|
||||
Route::post('signup/validate', 'AccountController@checkEmail');
|
||||
Route::post('signup/submit', 'AccountController@submitSignup');
|
||||
} else {
|
||||
Route::get('/', function() {
|
||||
return Redirect::to('dashboard');
|
||||
});
|
||||
}
|
||||
|
||||
// Confide routes
|
||||
Route::get('login', 'UserController@login');
|
||||
|
Loading…
x
Reference in New Issue
Block a user