Fixed repository dependencies

Change-Id: I42fb374b48711092ef2af07772fc64dc089869f5
Signed-off-by: smarcet <smarcet@gmail.com>
This commit is contained in:
smarcet 2020-10-27 23:47:01 -03:00
parent 30ac30b491
commit 09c472e319
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,