Fix: Un utilisateur doit pouvoir lire ces propres infos
This commit is contained in:
parent
03a28119f9
commit
d3b715974b
@ -16,7 +16,6 @@
|
|||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*
|
*
|
||||||
* $Id$
|
* $Id$
|
||||||
* $Source$
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -33,21 +32,23 @@ require_once(DOL_DOCUMENT_ROOT."/user.class.php");
|
|||||||
$langs->load("user");
|
$langs->load("user");
|
||||||
|
|
||||||
$user->getrights('user');
|
$user->getrights('user');
|
||||||
if (!$user->rights->user->user->lire)
|
|
||||||
accessforbidden();
|
|
||||||
|
|
||||||
// Sécurité accés client et commerciaux
|
// Sécurité accés client et commerciaux
|
||||||
$id = isset($_GET["id"])?$_GET["id"]:'';
|
$id = isset($_GET["id"])?$_GET["id"]:'';
|
||||||
|
|
||||||
|
// If user is not user read and no permission to read other users, we stop
|
||||||
|
if (($fuser->id != $user->id) && (! $user->rights->user->user->lire))
|
||||||
|
accessforbidden();
|
||||||
|
|
||||||
|
|
||||||
llxHeader();
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Visualisation de la fiche
|
* Visualisation de la fiche
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
llxHeader();
|
||||||
|
|
||||||
$user = new User($db);
|
$user = new User($db);
|
||||||
$user->id=$_GET["id"];
|
$user->id=$_GET["id"];
|
||||||
$user->fetch();
|
$user->fetch();
|
||||||
|
|||||||
@ -17,7 +17,6 @@
|
|||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*
|
*
|
||||||
* $Id$
|
* $Id$
|
||||||
* $Source$
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -40,13 +39,15 @@ $langs->load("companies");
|
|||||||
$langs->load("members");
|
$langs->load("members");
|
||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
|
|
||||||
if (!$user->rights->user->user->lire)
|
|
||||||
accessforbidden();
|
|
||||||
|
|
||||||
$fuser = new User($db);
|
$fuser = new User($db);
|
||||||
$fuser->id = $id;
|
$fuser->id = $id;
|
||||||
$fuser->fetch();
|
$fuser->fetch();
|
||||||
|
|
||||||
|
// If user is not user read and no permission to read other users, we stop
|
||||||
|
if (($fuser->id != $user->id) && (! $user->rights->user->user->lire))
|
||||||
|
accessforbidden();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
/* Actions */
|
/* Actions */
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user