forked from cachethq/cachet
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from CachetHQ/2.4
Update from upstream repo CachetHQ/Cachet
- Loading branch information
Showing
13 changed files
with
90 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,12 @@ | |
use Illuminate\Http\Request; | ||
use Symfony\Component\HttpKernel\Exception\NotAcceptableHttpException; | ||
|
||
/** | ||
* This is the acceptable middleware class. | ||
* | ||
* @author Graham Campbell <[email protected]> | ||
* @author James Brooks <[email protected]> | ||
*/ | ||
class Acceptable | ||
{ | ||
/** | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,13 @@ | |
use Illuminate\Http\Request; | ||
use Symfony\Component\HttpKernel\Exception\HttpException; | ||
|
||
/** | ||
* This is the admin middleware class. | ||
* | ||
* @author Joseph Cohen <[email protected]> | ||
* @author Graham Campbell <[email protected]> | ||
* @author James Brooks <[email protected]> | ||
*/ | ||
class Admin | ||
{ | ||
/** | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,13 @@ | |
use Illuminate\Http\Request; | ||
use Symfony\Component\HttpKernel\Exception\HttpException; | ||
|
||
/** | ||
* This is the api authentication middleware class. | ||
* | ||
* @author Joseph Cohen <[email protected]> | ||
* @author Graham Campbell <[email protected]> | ||
* @author James Brooks <[email protected]> | ||
*/ | ||
class ApiAuthentication | ||
{ | ||
/** | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,13 @@ | |
use Illuminate\Http\Request; | ||
use Symfony\Component\HttpKernel\Exception\HttpException; | ||
|
||
/** | ||
* This is the authenticate middleware class. | ||
* | ||
* @author Joseph Cohen <[email protected]> | ||
* @author Graham Campbell <[email protected]> | ||
* @author James Brooks <[email protected]> | ||
*/ | ||
class Authenticate | ||
{ | ||
/** | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,13 @@ | |
use Illuminate\Http\Request; | ||
use Jenssegers\Date\Date; | ||
|
||
/** | ||
* This is the localize middleware class. | ||
* | ||
* @author James Brooks <[email protected]> | ||
* @author Joseph Cohen <[email protected]> | ||
* @author Graham Campbell <[email protected]> | ||
*/ | ||
class Localize | ||
{ | ||
/** | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,13 @@ | |
use Illuminate\Support\Facades\Config; | ||
use Illuminate\Support\Facades\Redirect; | ||
|
||
/** | ||
* This is the ready for use middleware class. | ||
* | ||
* @author Graham Campbell <[email protected]> | ||
* @author James Brooks <[email protected]> | ||
* @author Joseph Cohen <[email protected]> | ||
*/ | ||
class ReadyForUse | ||
{ | ||
/** | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,13 @@ | |
use Illuminate\Http\RedirectResponse; | ||
use Illuminate\Http\Request; | ||
|
||
/** | ||
* This is the redirect if authenticated middleware class. | ||
* | ||
* @author Graham Campbell <[email protected]> | ||
* @author Joseph Cohen <[email protected]> | ||
* @author James Brooks <[email protected]> | ||
*/ | ||
class RedirectIfAuthenticated | ||
{ | ||
/** | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,12 +12,38 @@ | |
namespace CachetHQ\Cachet\Http\Middleware; | ||
|
||
use Closure; | ||
use Illuminate\Contracts\Config\Repository; | ||
use Illuminate\Http\Request; | ||
use Illuminate\Support\Facades\Config; | ||
use Illuminate\Support\Facades\Redirect; | ||
|
||
/** | ||
* This is the setup already completed middelware class. | ||
* | ||
* @author Graham Campbell <[email protected]> | ||
* @author James Brooks <[email protected]> | ||
* @author Joseph Cohen <[email protected]> | ||
*/ | ||
class SetupAlreadyCompleted | ||
{ | ||
/** | ||
* The config repository instance. | ||
* | ||
* @var \Illuminate\Contracts\Config\Repository | ||
*/ | ||
protected $config; | ||
|
||
/** | ||
* Creates a new setup already completed middleware instance. | ||
* | ||
* @param \Illuminate\Contracts\Config\Repository $config | ||
* | ||
* @return void | ||
*/ | ||
public function __construct(Repository $config) | ||
{ | ||
$this->config = $config; | ||
} | ||
|
||
/** | ||
* Handle an incoming request. | ||
* | ||
|
@@ -28,8 +54,8 @@ class SetupAlreadyCompleted | |
*/ | ||
public function handle(Request $request, Closure $next) | ||
{ | ||
if (Config::get('setting.app_name')) { | ||
return Redirect::to('dashboard'); | ||
if ($this->config->get('setting.app_name')) { | ||
return Redirect::route('dashboard.index'); | ||
} | ||
|
||
return $next($request); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,12 @@ | |
use Illuminate\Http\Request; | ||
use Illuminate\Support\Facades\Redirect; | ||
|
||
/** | ||
* This is the subscribers configured middleware class. | ||
* | ||
* @author James Brooks <[email protected]> | ||
* @author Graham Campbell <[email protected]> | ||
*/ | ||
class SubscribersConfigured | ||
{ | ||
/** | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,12 @@ | |
use Illuminate\Contracts\Config\Repository; | ||
use Illuminate\Http\Request; | ||
|
||
/** | ||
* This is the timezone middleware class. | ||
* | ||
* @author James Brooks <[email protected]> | ||
* @author Graham Campbell <[email protected]> | ||
*/ | ||
class Timezone | ||
{ | ||
/** | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters