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

View File

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