New: Add option MAIN_ONLY_LOGIN_ALLOWED to lock login to any user that is not value of constant.
For example MAIN_ONLY_LOGIN_ALLOWED=admin will lock login to any login except admin. This make possible to make maintenance works. A page to add/remove this constant will be added later in system-tools
This commit is contained in:
parent
9a8f90679b
commit
4f4d9ab716
@ -527,6 +527,7 @@ PDFMerge=PDF Merge
|
|||||||
Merge=Merge
|
Merge=Merge
|
||||||
PrintContentArea=Show page to print main content area
|
PrintContentArea=Show page to print main content area
|
||||||
NoMenu=No sub-menu
|
NoMenu=No sub-menu
|
||||||
|
WarningYouAreInMaintenanceMode=Warning, you are in a maintenance mode, so only login <b>%s</b> is allowed to connect.
|
||||||
# Week day
|
# Week day
|
||||||
Day1=Monday
|
Day1=Monday
|
||||||
Day2=Tuesday
|
Day2=Tuesday
|
||||||
|
|||||||
@ -526,6 +526,7 @@ PDFMerge=Fusion PDF
|
|||||||
Merge=Fusion
|
Merge=Fusion
|
||||||
PrintContentArea=Afficher page d'impression de la zone centrale
|
PrintContentArea=Afficher page d'impression de la zone centrale
|
||||||
NoMenu=Aucun sous-menu
|
NoMenu=Aucun sous-menu
|
||||||
|
WarningYouAreInMaintenanceMode=Attention, vous êtes en mode maintenance, aussi seul le login <b>%s</b> est autorisé à se connecter.
|
||||||
# Week day
|
# Week day
|
||||||
Day1=Lundi
|
Day1=Lundi
|
||||||
Day2=Mardi
|
Day2=Mardi
|
||||||
|
|||||||
@ -23,6 +23,14 @@
|
|||||||
* \version $Id$
|
* \version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL','1'); // Disables token renewal
|
||||||
|
if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1');
|
||||||
|
if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1');
|
||||||
|
if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1');
|
||||||
|
if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1');
|
||||||
|
//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); // We need to use translation files to know direction
|
||||||
|
if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1');
|
||||||
|
|
||||||
//require_once("../../conf/conf.php");
|
//require_once("../../conf/conf.php");
|
||||||
require_once("../../master.inc.php");
|
require_once("../../master.inc.php");
|
||||||
|
|
||||||
|
|||||||
@ -24,6 +24,14 @@
|
|||||||
* \version $Id$
|
* \version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL','1'); // Disables token renewal
|
||||||
|
if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1');
|
||||||
|
if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1');
|
||||||
|
if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1');
|
||||||
|
if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1');
|
||||||
|
//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); // We need to use translation files to know direction
|
||||||
|
if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1');
|
||||||
|
|
||||||
//require_once("../../conf/conf.php");
|
//require_once("../../conf/conf.php");
|
||||||
require_once("../../master.inc.php");
|
require_once("../../master.inc.php");
|
||||||
|
|
||||||
|
|||||||
@ -24,6 +24,14 @@
|
|||||||
* \version $Id$
|
* \version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL','1'); // Disables token renewal
|
||||||
|
if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1');
|
||||||
|
if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1');
|
||||||
|
if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1');
|
||||||
|
if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1');
|
||||||
|
//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); // We need to use translation files to know direction
|
||||||
|
if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1');
|
||||||
|
|
||||||
//require_once("../../conf/conf.php");
|
//require_once("../../conf/conf.php");
|
||||||
require_once("../../master.inc.php");
|
require_once("../../master.inc.php");
|
||||||
|
|
||||||
|
|||||||
@ -23,6 +23,14 @@
|
|||||||
* \version $Id$
|
* \version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL','1'); // Disables token renewal
|
||||||
|
if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1');
|
||||||
|
if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1');
|
||||||
|
if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1');
|
||||||
|
if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1');
|
||||||
|
//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); // We need to use translation files to know direction
|
||||||
|
if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1');
|
||||||
|
|
||||||
//require_once("../../conf/conf.php");
|
//require_once("../../conf/conf.php");
|
||||||
require_once("../../master.inc.php");
|
require_once("../../master.inc.php");
|
||||||
|
|
||||||
|
|||||||
@ -24,6 +24,14 @@
|
|||||||
* \version $Id$
|
* \version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL','1'); // Disables token renewal
|
||||||
|
if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1');
|
||||||
|
if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1');
|
||||||
|
if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1');
|
||||||
|
if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1');
|
||||||
|
//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); // We need to use translation files to know direction
|
||||||
|
if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1');
|
||||||
|
|
||||||
//require_once("../../conf/conf.php");
|
//require_once("../../conf/conf.php");
|
||||||
require_once("../../master.inc.php");
|
require_once("../../master.inc.php");
|
||||||
|
|
||||||
|
|||||||
@ -23,6 +23,14 @@
|
|||||||
* \version $Id$
|
* \version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL','1'); // Disables token renewal
|
||||||
|
if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1');
|
||||||
|
if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1');
|
||||||
|
if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1');
|
||||||
|
if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1');
|
||||||
|
//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); // We need to use translation files to know direction
|
||||||
|
if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1');
|
||||||
|
|
||||||
//require_once("../../conf/conf.php");
|
//require_once("../../conf/conf.php");
|
||||||
require_once("../../master.inc.php");
|
require_once("../../master.inc.php");
|
||||||
|
|
||||||
|
|||||||
@ -25,8 +25,16 @@
|
|||||||
* \version $Id$
|
* \version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
//if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL','1'); // Uncomment creates pb to relogon after a disconnect
|
||||||
|
if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1');
|
||||||
|
if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1');
|
||||||
|
if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1');
|
||||||
|
if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1');
|
||||||
|
if (! defined('EVEN_IF_ONLY_LOGIN_ALLOWED')) define('EVEN_IF_ONLY_LOGIN_ALLOWED','1');
|
||||||
|
|
||||||
require_once("../main.inc.php");
|
require_once("../main.inc.php");
|
||||||
|
|
||||||
|
// This can happen only with a bookmark or forged url call.
|
||||||
if (!empty($_SESSION["dol_authmode"]) && ($_SESSION["dol_authmode"] == 'forceuser'
|
if (!empty($_SESSION["dol_authmode"]) && ($_SESSION["dol_authmode"] == 'forceuser'
|
||||||
|| $_SESSION["dol_authmode"] == 'http'))
|
|| $_SESSION["dol_authmode"] == 'http'))
|
||||||
{
|
{
|
||||||
@ -36,7 +44,7 @@ if (!empty($_SESSION["dol_authmode"]) && ($_SESSION["dol_authmode"] == 'forceuse
|
|||||||
// Define url to go after disconnect
|
// Define url to go after disconnect
|
||||||
$urlfrom=empty($_SESSION["urlfrom"])?'':$_SESSION["urlfrom"];
|
$urlfrom=empty($_SESSION["urlfrom"])?'':$_SESSION["urlfrom"];
|
||||||
|
|
||||||
// Phenix module
|
// Destroy some cookies
|
||||||
if ($conf->phenix->enabled && $conf->phenix->cookie)
|
if ($conf->phenix->enabled && $conf->phenix->cookie)
|
||||||
{
|
{
|
||||||
// Destroy cookie
|
// Destroy cookie
|
||||||
@ -61,6 +69,6 @@ if ($urlfrom)
|
|||||||
{
|
{
|
||||||
$url=DOL_URL_ROOT.$urlfrom;
|
$url=DOL_URL_ROOT.$urlfrom;
|
||||||
}
|
}
|
||||||
|
//print 'url='.$url;exit;
|
||||||
header("Location: ".$url);
|
header("Location: ".$url);
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/php
|
#!/usr/bin/php
|
||||||
<?PHP
|
<?PHP
|
||||||
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2005-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -16,22 +16,6 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*
|
|
||||||
*
|
|
||||||
* !!! Envoi mailing !!!
|
|
||||||
*
|
|
||||||
* L'utilisation d'adresses de courriers <EFBFBD>lectroniques dans les op<EFBFBD>rations
|
|
||||||
* de prospection commerciale est subordonn<EFBFBD>e au recueil du consentement
|
|
||||||
* pr<EFBFBD>alable des personnes concern<EFBFBD>es.
|
|
||||||
*
|
|
||||||
* Le dispositif juridique applicable a <EFBFBD>t<EFBFBD> introduit par l'article 22 de
|
|
||||||
* la loi du 21 juin 2004 pour la confiance dans l'<EFBFBD>conomie num<EFBFBD>rique.
|
|
||||||
*
|
|
||||||
* Les dispositions applicables sont d<EFBFBD>finies par les articles L. 34-5 du
|
|
||||||
* code des postes et des t<EFBFBD>l<EFBFBD>communications et L. 121-20-5 du code de la
|
|
||||||
* consommation. L'application du principe du consentement pr<EFBFBD>alable en
|
|
||||||
* droit fran<EFBFBD>ais r<EFBFBD>sulte de la transposition de l'article 13 de la Directive
|
|
||||||
* europ<EFBFBD>enne du 12 juillet 2002 <EFBFBD> Vie priv<EFBFBD>e et communications <EFBFBD>lectroniques <EFBFBD>.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user