mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-08 20:46:05 +00:00
Merge branch 'seeddms-5.1.x' into seeddms-6.0.x
This commit is contained in:
commit
012977d606
|
@ -1,4 +1,35 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* MyDMS. Document Management System
|
||||
* Copyright (C) 2002-2005 Markus Westphal
|
||||
* Copyright (C) 2006-2008 Malcolm Cowe
|
||||
* Copyright (C) 2010 Matteo Lucarelli
|
||||
* Copyright (C) 2010-2024 Uwe Steinmann
|
||||
*
|
||||
* PHP version 8
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* @category SeedDMS
|
||||
* @package SeedDMS
|
||||
* @author Uwe Steinmann <info@seeddms.org>
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License
|
||||
* @link https://www.seeddms.org Main Site
|
||||
*/
|
||||
|
||||
/* Middleware for authentication based on session */
|
||||
class SeedDMS_Auth_Middleware_Session { /* {{{ */
|
||||
|
||||
|
@ -23,8 +54,9 @@ class SeedDMS_Auth_Middleware_Session { /* {{{ */
|
|||
$settings = $this->container->config;
|
||||
$logger = $this->container->logger;
|
||||
$userobj = null;
|
||||
if($this->container->has('userobj'))
|
||||
if ($this->container->has('userobj')) {
|
||||
$userobj = $this->container->userobj;
|
||||
}
|
||||
|
||||
if ($userobj) {
|
||||
$response = $next($request, $response);
|
||||
|
@ -50,17 +82,20 @@ class SeedDMS_Auth_Middleware_Session { /* {{{ */
|
|||
/* Delete Cookie */
|
||||
setcookie("mydms_session", $dms_session, time() - 3600, $settings->_httpRoot);
|
||||
if ($settings->_enableGuestLogin) {
|
||||
if(!($userobj = $dms->getUser($settings->_guestID)))
|
||||
if (!($userobj = $dms->getUser($settings->_guestID))) {
|
||||
return $response->withStatus(403);
|
||||
} else
|
||||
}
|
||||
} else {
|
||||
return $response->withStatus(403);
|
||||
}
|
||||
}
|
||||
if ($userobj->isAdmin()) {
|
||||
if ($resArr["su"]) {
|
||||
if(!($userobj = $dms->getUser($resArr["su"])))
|
||||
if (!($userobj = $dms->getUser($resArr["su"]))) {
|
||||
return $response->withStatus(403);
|
||||
}
|
||||
}
|
||||
}
|
||||
$dms->setUser($userobj);
|
||||
} else {
|
||||
return $response->withStatus(403);
|
||||
|
|
|
@ -1,6 +1,37 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* MyDMS. Document Management System
|
||||
* Copyright (C) 2002-2005 Markus Westphal
|
||||
* Copyright (C) 2006-2008 Malcolm Cowe
|
||||
* Copyright (C) 2010 Matteo Lucarelli
|
||||
* Copyright (C) 2010-2024 Uwe Steinmann
|
||||
*
|
||||
* PHP version 8
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* @category SeedDMS
|
||||
* @package SeedDMS
|
||||
* @author Uwe Steinmann <info@seeddms.org>
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License
|
||||
* @link https://www.seeddms.org Main Site
|
||||
*/
|
||||
|
||||
$conversionmgr = null;
|
||||
require_once("inc.ClassConversionMgr.php");
|
||||
require_once "inc.ClassConversionMgr.php";
|
||||
$conversionmgr = new SeedDMS_ConversionMgr();
|
||||
|
||||
if (!empty($settings->_converters['preview'])) {
|
||||
|
|
|
@ -1,28 +1,41 @@
|
|||
<?php
|
||||
// MyDMS. Document Management System
|
||||
// Copyright (C) 2002-2005 Markus Westphal
|
||||
// Copyright (C) 2006-2008 Malcolm Cowe
|
||||
// Copyright (C) 2010 Matteo Lucarelli
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation; either version 2 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
/**
|
||||
* MyDMS. Document Management System
|
||||
* Copyright (C) 2002-2005 Markus Westphal
|
||||
* Copyright (C) 2006-2008 Malcolm Cowe
|
||||
* Copyright (C) 2010 Matteo Lucarelli
|
||||
* Copyright (C) 2010-2024 Uwe Steinmann
|
||||
*
|
||||
* PHP version 8
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* @category SeedDMS
|
||||
* @package SeedDMS
|
||||
* @author Uwe Steinmann <info@seeddms.org>
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License
|
||||
* @link https://www.seeddms.org Main Site
|
||||
*/
|
||||
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
|
||||
if(!empty($settings->_coreDir))
|
||||
require_once($settings->_coreDir.'/Core.php');
|
||||
else
|
||||
require_once('vendor/seeddms/core/Core.php');
|
||||
if (!empty($settings->_coreDir)) {
|
||||
require_once $settings->_coreDir . '/Core.php';
|
||||
} else {
|
||||
require_once 'vendor/seeddms/core/Core.php';
|
||||
}
|
||||
|
||||
$request = Request::createFromGlobals();
|
||||
|
|
|
@ -1,34 +1,46 @@
|
|||
<?php
|
||||
// MyDMS. Document Management System
|
||||
// Copyright (C) 2002-2005 Markus Westphal
|
||||
// Copyright (C) 2006-2008 Malcolm Cowe
|
||||
// Copyright (C) 2010 Matteo Lucarelli
|
||||
// Copyright (C) 2010-2016 Uwe Steinmann
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation; either version 2 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
if(!isset($settings))
|
||||
require_once("../inc/inc.Settings.php");
|
||||
require_once("inc/inc.Utils.php");
|
||||
require_once("inc/inc.LogInit.php");
|
||||
require_once("inc/inc.Language.php");
|
||||
require_once("inc/inc.Init.php");
|
||||
require_once("inc/inc.Extension.php");
|
||||
require_once("inc/inc.DBInit.php");
|
||||
require_once("inc/inc.ClassUI.php");
|
||||
require_once("inc/inc.Authentication.php");
|
||||
/**
|
||||
* MyDMS. Document Management System
|
||||
* Copyright (C) 2002-2005 Markus Westphal
|
||||
* Copyright (C) 2006-2008 Malcolm Cowe
|
||||
* Copyright (C) 2010 Matteo Lucarelli
|
||||
* Copyright (C) 2010-2024 Uwe Steinmann
|
||||
*
|
||||
* PHP version 8
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* @category SeedDMS
|
||||
* @package SeedDMS
|
||||
* @author Uwe Steinmann <info@seeddms.org>
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License
|
||||
* @link https://www.seeddms.org Main Site
|
||||
*/
|
||||
|
||||
if(!isset($settings)) {
|
||||
require_once "../inc/inc.Settings.php");
|
||||
}
|
||||
require_once "inc/inc.Utils.php";
|
||||
require_once "inc/inc.LogInit.php";
|
||||
require_once "inc/inc.Language.php";
|
||||
require_once "inc/inc.Init.php";
|
||||
require_once "inc/inc.Extension.php";
|
||||
require_once "inc/inc.DBInit.php";
|
||||
require_once "inc/inc.ClassUI.php";
|
||||
require_once "inc/inc.Authentication.php";
|
||||
|
||||
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
|
||||
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user));
|
||||
|
|
|
@ -1,35 +1,47 @@
|
|||
<?php
|
||||
// MyDMS. Document Management System
|
||||
// Copyright (C) 2002-2005 Markus Westphal
|
||||
// Copyright (C) 2006-2008 Malcolm Cowe
|
||||
// Copyright (C) 2010 Matteo Lucarelli
|
||||
// Copyright (C) 2010-2016 Uwe Steinmann
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation; either version 2 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
if(!isset($settings))
|
||||
require_once("../inc/inc.Settings.php");
|
||||
require_once("inc/inc.Utils.php");
|
||||
require_once("inc/inc.LogInit.php");
|
||||
require_once("inc/inc.Language.php");
|
||||
require_once("inc/inc.Init.php");
|
||||
require_once("inc/inc.Extension.php");
|
||||
require_once("inc/inc.DBInit.php");
|
||||
require_once("inc/inc.ClassUI.php");
|
||||
require_once("inc/inc.ClassAccessOperation.php");
|
||||
require_once("inc/inc.Authentication.php");
|
||||
/**
|
||||
* MyDMS. Document Management System
|
||||
* Copyright (C) 2002-2005 Markus Westphal
|
||||
* Copyright (C) 2006-2008 Malcolm Cowe
|
||||
* Copyright (C) 2010 Matteo Lucarelli
|
||||
* Copyright (C) 2010-2016 Uwe Steinmann
|
||||
*
|
||||
* PHP version 8
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* @category SeedDMS
|
||||
* @package SeedDMS
|
||||
* @author Uwe Steinmann <info@seeddms.org>
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License
|
||||
* @link https://www.seeddms.org Main Site
|
||||
*/
|
||||
|
||||
if (!isset($settings)) {
|
||||
require_once "../inc/inc.Settings.php";
|
||||
}
|
||||
require_once "inc/inc.Utils.php";
|
||||
require_once "inc/inc.LogInit.php";
|
||||
require_once "inc/inc.Language.php";
|
||||
require_once "inc/inc.Init.php";
|
||||
require_once "inc/inc.Extension.php";
|
||||
require_once "inc/inc.DBInit.php";
|
||||
require_once "inc/inc.ClassUI.php";
|
||||
require_once "inc/inc.ClassAccessOperation.php";
|
||||
require_once "inc/inc.Authentication.php";
|
||||
|
||||
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
|
||||
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user));
|
||||
|
|
Loading…
Reference in New Issue
Block a user