Skip to content

Commit

Permalink
Fix: When user has no permissions to see all other user, we must keep
Browse files Browse the repository at this point in the history
only user.
  • Loading branch information
eldy committed May 26, 2014
1 parent 300e430 commit 1199d54
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion htdocs/core/class/html.formother.class.php
Expand Up @@ -363,7 +363,7 @@ function select_salesrepresentatives($selected,$htmlname,$user,$showstatus=0)
$sql_usr = "SELECT u.rowid, u.lastname, u.firstname, u.statut, u.login";
$sql_usr.= " FROM ".MAIN_DB_PREFIX."user as u";
$sql_usr.= " WHERE u.entity IN (0,".$conf->entity.")";
if (empty($user->rights->user->user->lire)) $sql_usr.=" AND u.fk_societe = ".($user->societe_id?$user->societe_id:0);
if (empty($user->rights->user->user->lire)) $sql_usr.=" AND u.rowid = ".$user->id;
// Add existing sales representatives of thirdparty of external user
if (empty($user->rights->user->user->lire) && $user->societe_id)
{
Expand Down

0 comments on commit 1199d54

Please sign in to comment.