Fix: [bug #478] Can access pages belonging to disabled modules
This commit is contained in:
parent
18944a3d9b
commit
286854bf2c
@ -2,6 +2,7 @@
|
|||||||
/* Copyright (C) 2007-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
/* Copyright (C) 2007-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2007-2010 Jean Heimburger <jean@tiaris.info>
|
* Copyright (C) 2007-2010 Jean Heimburger <jean@tiaris.info>
|
||||||
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||||
|
* Copyright (C) 2012 Regis Houssin <regis@dolibarr.fr>
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@ -34,9 +35,9 @@ $langs->load("compta");
|
|||||||
|
|
||||||
// Protection if external user
|
// Protection if external user
|
||||||
if ($user->societe_id > 0)
|
if ($user->societe_id > 0)
|
||||||
{
|
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
}
|
|
||||||
|
$result = restrictedArea($user, 'societe&facture');
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@ -2,6 +2,7 @@
|
|||||||
/* Copyright (C) 2007-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
/* Copyright (C) 2007-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2007-2010 Jean Heimburger <jean@tiaris.info>
|
* Copyright (C) 2007-2010 Jean Heimburger <jean@tiaris.info>
|
||||||
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||||
|
* Copyright (C) 2012 Regis Houssin <regis@dolibarr.fr>
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@ -35,9 +36,9 @@ $langs->load("compta");
|
|||||||
|
|
||||||
// Protection if external user
|
// Protection if external user
|
||||||
if ($user->societe_id > 0)
|
if ($user->societe_id > 0)
|
||||||
{
|
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
}
|
|
||||||
|
$result = restrictedArea($user, 'societe&facture');
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
|
|||||||
@ -36,7 +36,8 @@ $langs->load("admin");
|
|||||||
$langs->load("products");
|
$langs->load("products");
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if (! $user->admin) accessforbidden();
|
if (! $user->admin || empty($conf->product->enabled))
|
||||||
|
accessforbidden();
|
||||||
|
|
||||||
$action = GETPOST('action','alpha');
|
$action = GETPOST('action','alpha');
|
||||||
$value = GETPOST('value','alpha');
|
$value = GETPOST('value','alpha');
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user