do not run authentication and pass user to addRoute hook

This commit is contained in:
Uwe Steinmann 2020-05-26 20:47:09 +02:00
parent 5d5a7da2d0
commit 42de312953

View File

@ -26,13 +26,13 @@ if(true) {
include("inc/inc.Init.php"); include("inc/inc.Init.php");
include("inc/inc.Extension.php"); include("inc/inc.Extension.php");
include("inc/inc.DBInit.php"); include("inc/inc.DBInit.php");
include("inc/inc.Authentication.php"); // include("inc/inc.Authentication.php");
require "vendor/autoload.php"; require "vendor/autoload.php";
$c = new \Slim\Container(); //Create Your container $c = new \Slim\Container(); //Create Your container
$c['notFoundHandler'] = function ($c) use ($settings, $dms, $user, $theme) { $c['notFoundHandler'] = function ($c) use ($settings, $dms, $theme) {
return function ($request, $response) use ($c, $settings, $dms, $user, $theme) { return function ($request, $response) use ($c, $settings, $dms, $theme) {
$uri = $request->getUri(); $uri = $request->getUri();
if($uri->getBasePath()) if($uri->getBasePath())
$file = $uri->getPath(); $file = $uri->getPath();
@ -55,7 +55,7 @@ if(true) {
if(isset($GLOBALS['SEEDDMS_HOOKS']['initDMS'])) { if(isset($GLOBALS['SEEDDMS_HOOKS']['initDMS'])) {
foreach($GLOBALS['SEEDDMS_HOOKS']['initDMS'] as $hookObj) { foreach($GLOBALS['SEEDDMS_HOOKS']['initDMS'] as $hookObj) {
if (method_exists($hookObj, 'addRoute')) { if (method_exists($hookObj, 'addRoute')) {
$hookObj->addRoute(array('dms'=>$dms, 'user'=>$user, 'app'=>$app, 'settings'=>$settings)); $hookObj->addRoute(array('dms'=>$dms, 'app'=>$app, 'settings'=>$settings));
} }
} }
} }