Merge "Fixed repository dependencies"

This commit is contained in:
Zuul 2020-10-28 19:40:38 +00:00 committed by Gerrit Code Review
commit 91acb2bfc4
2 changed files with 5 additions and 2 deletions

View File

@ -11,6 +11,8 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
**/ **/
use App\Repositories\IServerConfigurationRepository;
use Closure; use Closure;
use Illuminate\Support\Facades\Config; use Illuminate\Support\Facades\Config;
use Illuminate\Support\Facades\Response; use Illuminate\Support\Facades\Response;
@ -19,6 +21,7 @@ use Utils\Services\ICheckPointService;
use Utils\Services\ServiceLocator; use Utils\Services\ServiceLocator;
use Utils\Services\UtilsServiceCatalog; use Utils\Services\UtilsServiceCatalog;
use Exception; use Exception;
use Illuminate\Support\Facades\App;
/** /**
* Class SingleAccessPoint * Class SingleAccessPoint
* @package App\Http\Middleware * @package App\Http\Middleware
@ -28,11 +31,11 @@ final class SingleAccessPoint
public function handle($request, Closure $next) public function handle($request, Closure $next)
{ {
// Perform action // Perform action
$checkpoint_service = ServiceLocator::getInstance()->getService(UtilsServiceCatalog::CheckPointService);
if(Config::get('server.banning_enable', true)) if(Config::get('server.banning_enable', true))
{ {
try { try {
//checkpoint security pattern entry point //checkpoint security pattern entry point
$checkpoint_service = ServiceLocator::getInstance()->getService(UtilsServiceCatalog::CheckPointService);
if ($checkpoint_service instanceof ICheckPointService && !$checkpoint_service->check()) { if ($checkpoint_service instanceof ICheckPointService && !$checkpoint_service->check()) {
return Response::view('errors.404', [], 404); return Response::view('errors.404', [], 404);
} }

View File

@ -136,12 +136,12 @@ return [
* Application Service Providers... * Application Service Providers...
*/ */
\App\Http\Utils\UtilsProvider::class, \App\Http\Utils\UtilsProvider::class,
Repositories\RepositoriesProvider::class,
App\Providers\AppServiceProvider::class, App\Providers\AppServiceProvider::class,
App\Providers\AuthServiceProvider::class, App\Providers\AuthServiceProvider::class,
App\Providers\EventServiceProvider::class, App\Providers\EventServiceProvider::class,
App\Providers\RouteServiceProvider::class, App\Providers\RouteServiceProvider::class,
Services\Utils\UtilsProvider::class, Services\Utils\UtilsProvider::class,
Repositories\RepositoriesProvider::class,
Services\OAuth2\OAuth2ServiceProvider::class, Services\OAuth2\OAuth2ServiceProvider::class,
Services\OpenId\OpenIdProvider::class, Services\OpenId\OpenIdProvider::class,
Auth\AuthenticationServiceProvider::class, Auth\AuthenticationServiceProvider::class,