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.
|
||||
*
|
||||
* $Id$
|
||||
* $Source$
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -33,21 +32,23 @@ require_once(DOL_DOCUMENT_ROOT."/user.class.php");
|
||||
$langs->load("user");
|
||||
|
||||
$user->getrights('user');
|
||||
if (!$user->rights->user->user->lire)
|
||||
accessforbidden();
|
||||
|
||||
// Sécurité accés client et commerciaux
|
||||
$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
|
||||
*
|
||||
*/
|
||||
|
||||
llxHeader();
|
||||
|
||||
$user = new User($db);
|
||||
$user->id=$_GET["id"];
|
||||
$user->fetch();
|
||||
|
||||
@ -17,7 +17,6 @@
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* $Id$
|
||||
* $Source$
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -40,13 +39,15 @@ $langs->load("companies");
|
||||
$langs->load("members");
|
||||
$langs->load("bills");
|
||||
|
||||
if (!$user->rights->user->user->lire)
|
||||
accessforbidden();
|
||||
|
||||
$fuser = new User($db);
|
||||
$fuser->id = $id;
|
||||
$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 */
|
||||
|
||||
Loading…
Reference in New Issue
Block a user